Skip to content

m3u8视频播放器

m3u8播放器支持播放网络上所有主流音视频格式文件。例如:m3u8、hls、dash、flv、mp4等

接口地址

url
https://api.nxvav.cn/api/m3u8/

请求示例

https://api.nxvav.cn/api/m3u8/?url=https://ghfast.top/https://raw.githubusercontent.com/nuoxi4n/Demo_Video/refs/heads/main/flv/RenJiPengYou.flv

https://api.nxvav.cn/api/m3u8/?url=https://ghfast.top/https://raw.githubusercontent.com/nuoxi4n/Demo_Video/refs/heads/main/mp4/No_Doubt.mp4&autoplay=true

https://api.nxvav.cn/api/m3u8/?url=https://ali-m-l.cztv.com/channels/lantian/channel001/1080p.m3u8&autoplay=true&live=true

https://api.nxvav.cn/api/m3u8/?url=https://ghfast.top/https://raw.githubusercontent.com/nuoxi4n/Demo_Video/refs/heads/main/hls/Merry_Christmas_Mr.Lawrence/Merry_Christmas_Mr.Lawrence.m3u8

请求参数

参数名类型必填说明
urlstring视频直链,支持 hls、dash、flv、webtorrent、mp4 等格式
typestring视频类型,可选值autohlsflvdashnormal。不填默认auto
coverstring视频封面图片直链链接
liveboolean直播模式,可选值truefalse。不填默认false
autoplayboolean自动播放,可选值truefalse。不填默认false
hideplayboolean隐藏控件,可选值truefalse。不填默认false
loopboolean循环播放,可选值truefalse。不填默认false
langstring播放器语言,可选值enzh-cnzh-twko-krdejaru。不填默认zh-cn

返回响应

返回参数类型说明
HTMLtext/html网页播放器

返回示例

text
Content-Type: text/html
Url: https://api.nxvav.cn/api/m3u8/?url=https://ghfast.top/https://raw.githubusercontent.com/nuoxi4n/Demo_Video/refs/heads/main/mp4/No_Doubt.mp4
json
{
    "code": 400,
    "msg": "视频地址无效"
}