百度网盘在线播放视频接口,官方文档https://pan.baidu.com/union/doc/ll1hhaox3
下面是官方文档
此情况表示请求成功,使用播放器为用户播放即可
响应Content-Type: application/x-mpegURL
#EXTM3U //起始标识
#EXT-X-TARGETDURATION:15 //分片最大时长
#EXT-X-DISCONTINUITY //分段表示
#EXTINF:2, //分片时长
https_url //分片下载链接
#EXTINF:2,
https_url //分片链接有效期8个小时
#EXTINF:2,
https_url
#EXTINF:4,
https_url
#EXTINF:10,
https_url
#EXT-X-ENDLIST //转码结束标识,如果未出现标识视频未全部转码完成,可轮询查看
这里是我返回的数据
#EXT-X-TARGETDURATION:15
#EXT-X-DISCONTINUITY
#EXTINF:2,
http://v3.baidupcs.com/video/netdisk-videotran-xian/c9464ddc86b8c8f3e0e706c68016a659_1074_1_ts/5427bca094af9fecf094a8d52ff76e81?ts_size=3768648&app_id=25999757&csl=130&dp-logid=540241369049529752&fn=01.Hello%21_1080p.mp4&from_type=1&fsid=249257727688496&iv=0&logid=540241369049529752&mtime=1651126425&ouk=4503603317846886&r=276589220&size=17078601&sta_cs=3634&sta_dt=video&sta_dx=16&time=1655892657&to=hp03&tot=bx7KP&uo=ct&uva=3917702896&vuk=4503603317846886&backhost=%5B%22xact07.baidupcs.com%22%2C%22yqall07.baidupcs.com%22%5D&dtime=2&etag=5427bca094af9fecf094a8d52ff76e81&fid=830e99de46d36f7459e80506390fa1ec-4503603317846886&len=142880&range=0-142879®ion=xian&resv4=&sign=BOUTHNF-F3530edecde9cd71b79378b290804a96-YBhnaL6DRutJmxkXiNIzwezx8nI%253D&xcode=93b319df222c6c95e0f38452fe79868e1aa5c486008cdc9273b92d8d17ae0750a63d2c3102060707dbf3333c3de69fbd5daf0730acc121d6&xv=6&need_suf=&pmk=14005427bca094af9fecf094a8d52ff76e81fba8be95
#EXTINF:2,
http://v3.baidupcs.com/video/netdisk-videotran-xian/c9464ddc86b8c8f3e0e706c68016a659_1074_1_ts/5427bca094af9fecf094a8d52ff76e81?ts_size=3768648&app_id=25999757&csl=130&dp-logid=540241369049529752&fn=01.Hello%21_1080p.mp4&from_type=1&fsid=249257727688496&iv=0&logid=540241369049529752&mtime=1651126425&ouk=4503603317846886&r=276589220&size=17078601&sta_cs=3634&sta_dt=video&sta_dx=16&time=1655892657&to=hp03&tot=bx7KP&uo=ct&uva=3917702896&vuk=4503603317846886&dtime=2&etag=5427bca094af9fecf094a8d52ff76e81&fid=830e99de46d36f7459e80506390fa1ec-4503603317846886&len=155476&range=142880-298355®ion=xian&resv4=&sign=BOUTHNF-F3530edecde9cd71b79378b290804a96-YBhnaL6DRutJmxkXiNIzwezx8nI%253D&xcode=93b319df222c6c95e0f38452fe79868e1aa5c486008cdc9273b92d8d17ae0750a63d2c3102060707dbf3333c3de69fbd5daf0730acc121d6&xv=6&need_suf=&pmk=14005427bca094af9fecf094a8d52ff76e81fba8be95000000398148&by=my-streaming
#EXTINF:2,
http://v3.baidupcs.com/video/netdisk-videotran-xia_
#EXTINF:4,
http://v3.baidupcs.com/video/netdisk-videotran-xian/c9464ddc86b8c8f3e0e706c68016a659_1074_1_ts/5427bca094af9fecf094a8d52ff76e81?ts_size=3768
#EXTINF:10,
http://v3.baidupcs.com/video/netdisk-videotran-xian/c9464ddc86b8c8f3e0e706c68016a659_1074_1_ts/5427bca094af9fecf094a8d52ff76e81?ts_size=3768648&app_id=25999757&csl=130&dp-logid=540241369049529752&fn=01.Hello%21_1080p.mp4&from_typ
#EXTINF:10,
http://v3.baidupcs.com/video/netdisk-videotran-xian/c9464ddc86b8c8f3e0e706c68016a659_1074_1_ts/5427bca094af9fecf094a8d52ff76e81?ts_size=3768648&app_id=25999757&csl=130&dp-logid=540241369049529752&fn=01.Hello%21_1080p.mp4&from_type=1&fsid=249257727688496&iv=0&logid=540241369049529752&mtime=1651126425&ouk=45036033178
#EXTINF:10,
http://v3.baidupcs.com/video/netdisk-videotran-xian/c9464ddc86b8c8f3e0e706c68016a659_1074_1_ts/5427bca094af9fecf094a8d52ff76e81?ts_size=3768648&app_id=25999757&csl=130&dp-logid=540241369049529752&fn=01.Hello%21_1080p.mp4&from_type=1&fsid=249257727688496&iv=0&logid=540241369049529752&mtime=1651126425&ouk=4503603317846886&r=276589220&size=17078601&sta_cs=3634&sta_dt=video&sta_dx=16&time=1655892657&to=
#EXTINF:10,
http://v3.baidupcs.com/video/netdisk-videotran-xian/c9464ddc86b8c8f3e0e706c68016a659_1074_1_ts/5427bca094af9fecf094a8d52ff76e81?ts_size=3768648&app_id=25999757&csl=130&dp-logid=540241369049529752&fn=01.Hello%21_1080p.mp4&from_type=1&fsid=249257727688496&iv=0&logid=540241369049529752&mtime=1651126425&ouk=4503603317846886&r=276589220&size=17078601&sta_cs=3634&sta_dt=video&sta_dx=16&time=1655892657&to=hp03&tot=bx7KP&uo=ct&uva=3917702896&vuk=4503603317846886&dtime=10&etag=5427bca094af9fe
#EXTINF:10,
http://v3.baidupcs.com/video/netdisk-videotran-xian/c9464ddc86b8c8f3e0e706c68016a659_1074_1_ts/5427bca094af9fecf094a8d52ff76e81?ts_size=3768648&app_id=25999757&csl=130&dp-logid=540241369049529752&fn=01.Hello%21_1080p.mp4&from_type=1&fsid=249257727688496&iv=0&logid=540241369049529752&mtime=1651126425&ouk=4503603317846886&r=276589220&size=17078601&sta_cs=3634&sta_dt=video&sta_dx=16&time=1655892657&to=hp03&tot=bx7KP&uo=ct&uva=3917702896&vuk=4503603317846886&dtime=10&etag=5427bca094af9fecf094a8d52ff76e81&fid=830e99de46d36f7459e80506390fa1ec-4503603317846886&len=429204&ran
#EXTINF:10,
http://v3.baidupcs.com/video/netdisk-videotran-xian/c9464ddc86b8c8f3e0e706c68016a659_1074_1_ts/5427bca094af9fecf094a8d52ff76e81?ts_size=3768648&app_id=25999757&csl=130&dp-logid=540241369049529752&fn=01.Hello%21_1080p.mp4&from_type=1&fsid=249257727688496&iv=0&logid=540241369049529752&mtime=1651126425&ouk=4503603317846886&r=276589220&size=17078601&sta_cs=3634&sta_dt=video&sta_dx=16&time=1655892657&to=hp03&tot=bx7KP&uo=ct&uva=3917702896&vuk=4503603317846886&dtime=10&etag=5427bca094af9fecf094a8d52ff76e81&fid=830e99de46d36f7459e80506390fa1ec-4503603317846886&len=595772&range=2741040-3336811®ion=xian&resv4=&sign=BOUTHNF-F3530edecde9cd71b79378b290804a96-YB
#EXTINF:8,
http://v3.baidupcs.com/video/netdisk-videotran-xian/c9464ddc86b8c8f3e0e706c68016a659_1074_1_ts/5427bca094af9fecf094a8d52ff76e81?ts_size=3768648&app_id=25999757&csl=130&dp-logid=540241369049529752&fn=01.Hello%21_1080p.mp4&from_type=1&fsid=249257727688496&iv=0&logid=540241369049529752&mtime=1651126425&ouk=4503603317846886&r=276589220&size=17078601&sta_cs=3634&sta_dt=video&sta_dx=16&time=1655892657&to=hp03&tot=bx7KP&uo=ct&uva=3917702896&vuk=4503603317846886&dtime=8&etag=5427bca094af9fecf094a8d52ff76e81&fid=830e99de46d36f7459e80506390fa1ec-4503603317846886&len=431836&range=3336812-3768647®ion=xian&resv4=&sign=BOUTHNF-F3530edecde9cd71b79378b290804a96-YBhnaL6DRutJmxkXiNIzwezx8nI%253D&xcode=93b319df222c6c95e0f38452fe79868e1aa5c486008cdc9273b
#EXT-X-ENDLIST
开发工具是HBuilder
问题1:返回的数据中有的url不完整,但是又返回了转码结束符#EXT-X-ENDLIST
问题2:返回的m3u8这种数据格式怎么播放,文档上说了用video.js,始终没弄出来
网上好多都是类似于后面这种链接m3u8的播放,而不是具体数据,http://1257120875.vod2.myqcloud.com/0ef121cdvodtransgzp1257120875/3055695e5285890780828799271/v.f230.m3u8
有没有兄弟指点下,谢谢了