RSC-010, ERROR, [Reference to non-standard resource type found.]

本文介绍了一种解决EPUB电子书中视频链接引发的RSC-010和RSC-011错误的方法,通过将直接链接替换为内联视频元素并用JavaScript触发播放,解决了资源类型不标准及引用非脊椎项目的问题。

使用epubcheck检查epub文件,报错:

<message>RSC-010, ERROR, [Reference to non-standard resource type found.], chapter-001.xhtml (1087-112)</message>
<message>RSC-011, ERROR, [Found a reference to a resource that is not a spine item.], chapter-001.xhtml (1087-112)</message>

源文件:

<div class="imagediv3">
	<a class="image4" style="width:50px;height:50px;z-index:1;" href="./Media/chapter-001hyperlinkitem1.mp4"/>
	<img class="image4" src="Media/chapter-001image1.jpeg" id="imageItem-4" alt="Media/chapter-001image1.jpeg"/>
</div>

解决:

<div class="imagediv3">					
	<video src="./Media/chapter-001hyperlinkitem1.mp4" id="videoID_1">Your browser does not support the video element.</video>
	<a class="image4" style="z-index:1;" href="javascript:document.getElementById('videoID_1').play();"/>
	<img class="image4" src="Media/chapter-001image1.jpeg" id="imageItem-4" alt="Media/chapter-001image1.jpeg"/>
</div>

只消除了报错信息,暂时无法实现点击图片播放视频

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值