mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-13 07:46:17 -08:00
Update artplayer plugin versions
This commit is contained in:
1 parent
b235f9bbac
commit
d8720d3bcf
14 files changed
+366
-257
No files matched your search
@@ -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);
|
||||
});
|
||||
Reference in new issue
Block a user