mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 19:06:15 -08:00
chore: Add artplayer plugins for various video formats
This commit is contained in:
1 parent
eb5369573d
commit
c3ea0bdeec
14 files changed
+46
-1
No files matched your search
@@ -1,3 +1,6 @@
|
||||
// npm i artplayer-plugin-ads
|
||||
// import artplayerPluginAds from 'artplayer-plugin-ads';
|
||||
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/video.mp4',
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// npm i artplayer-plugin-chromecast
|
||||
// import artplayerPluginChromecast from 'artplayer-plugin-chromecast';
|
||||
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/video.mp4',
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// npm i artplayer-plugin-danmuku
|
||||
// import artplayerPluginDanmuku from 'artplayer-plugin-danmuku';
|
||||
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/video.mp4',
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// npm i dashjs
|
||||
// import dashjs from 'dashjs';
|
||||
|
||||
function playMpd(video, url, art) {
|
||||
if (dashjs.supportsMediaSource()) {
|
||||
if (art.dash) art.dash.destroy();
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
// npm i dashjs
|
||||
// npm i artplayer-plugin-dash-quality
|
||||
|
||||
// import dashjs from 'dashjs';
|
||||
// import artplayerPluginDashQuality from 'artplayer-plugin-dash-quality';
|
||||
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: 'https://dash.akamaized.net/akamai/bbb_30fps/bbb_30fps.mpd',
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// npm i flv.js
|
||||
// import flvjs from 'flv.js';
|
||||
|
||||
function playFlv(video, url, art) {
|
||||
if (flvjs.isSupported()) {
|
||||
if (art.flv) art.flv.destroy();
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// npm i hls.js
|
||||
// import Hls from 'hls.js';
|
||||
|
||||
function playM3u8(video, url, art) {
|
||||
if (Hls.isSupported()) {
|
||||
if (art.hls) art.hls.destroy();
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
// npm i hls.js
|
||||
// npm i artplayer-plugin-hls-quality
|
||||
|
||||
// import Hls from 'hls.js';
|
||||
// import artplayerPluginHlsQuality from 'artplayer-plugin-hls-quality';
|
||||
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: 'https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8',
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// npm i artplayer-plugin-iframe
|
||||
// import ArtplayerPluginIframe from 'artplayer-plugin-iframe';
|
||||
|
||||
const $iframe = document.createElement('iframe');
|
||||
$iframe.allowFullscreen = true;
|
||||
$iframe.width = '100%';
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// npm i artplayer-plugin-libass
|
||||
// import artplayerPluginLibass from 'artplayer-plugin-libass';
|
||||
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/video.mp4',
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// npm i mpegts
|
||||
// import mpegts from 'mpegts';
|
||||
|
||||
function playFlv(video, url, art) {
|
||||
if (mpegts.isSupported()) {
|
||||
if (art.flv) art.flv.destroy();
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// npm i artplayer-plugin-multiple-subtitles
|
||||
// import artplayerPluginMultipleSubtitles from 'artplayer-plugin-multiple-subtitles';
|
||||
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/video.mp4',
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// npm i artplayer-plugin-vtt-thumbnail
|
||||
// import artplayerPluginVttThumbnail from 'artplayer-plugin-vtt-thumbnail';
|
||||
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/bbb-video.mp4',
|
||||
|
||||
@@ -242,7 +242,7 @@ class Artplayer extends (0, _emitterDefault.default) {
|
||||
return "development";
|
||||
}
|
||||
static get build() {
|
||||
return "2024-05-23 22:40:09";
|
||||
return "2024-05-26 22:46:50";
|
||||
}
|
||||
static get config() {
|
||||
return 0, _configDefault.default;
|
||||
|
||||
Reference in new issue
Block a user