Update artplayer plugin versions

This commit is contained in:
Harvey Zack committed 2023-11-26 14:05:09 +08:00
1 parent b235f9bbac
commit d8720d3bcf
14 files changed
+366 -257

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
function playMpd(video, url, art) {
if (dashjs.supportsMediaSource()) {
if (art.dash) art.dash.destroy();
const dash = dashjs.MediaPlayer().create();
dash.initialize(video, url, art.option.autoplay);
art.dash = dash;
art.on('destroy', () => dash.destroy());
} else {
art.notice.show = 'Unsupported playback format: mpd';
}
}
var art = new Artplayer({
container: '.artplayer-app',
url: 'https://dash.akamaized.net/akamai/bbb_30fps/bbb_30fps.mpd',
type: 'mpd',
customType: {
mpd: playMpd
},
});
art.on('ready', () => {
console.info(art.dash);
});