From 32b43ac5db89dbbb07a4addf4d7694ec68ee066b Mon Sep 17 00:00:00 2001 From: Harvey Zack Date: Sat, 24 Nov 2018 23:28:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9B=B4=E5=A4=9A=E6=BC=94?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/lab/dash.html | 60 +++++++++++++++++++++++++++++++++++++++ docs/lab/js/dash.js | 10 +++++++ docs/lab/js/webtorrent.js | 16 +++++++++++ docs/lab/shaka.html | 2 +- docs/lab/webtorrent.html | 60 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 147 insertions(+), 1 deletion(-) create mode 100644 docs/lab/dash.html create mode 100644 docs/lab/js/dash.js create mode 100644 docs/lab/js/webtorrent.js create mode 100644 docs/lab/webtorrent.html diff --git a/docs/lab/dash.html b/docs/lab/dash.html new file mode 100644 index 000000000..07769d566 --- /dev/null +++ b/docs/lab/dash.html @@ -0,0 +1,60 @@ + + + + + ArtPlayer.js Lab + + + + + + + + + + + + + + +
+
+
+ + +
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/docs/lab/js/dash.js b/docs/lab/js/dash.js new file mode 100644 index 000000000..d137feb3e --- /dev/null +++ b/docs/lab/js/dash.js @@ -0,0 +1,10 @@ +var art = new Artplayer({ + container: '.artplayer-app', + url: 'https://dash.akamaized.net/envivio/EnvivioDash3/manifest.mpd', + customType: { + mpd: function(video, url) { + var player = dashjs.MediaPlayer().create(); + player.initialize(video, url, true); + }, + }, +}); \ No newline at end of file diff --git a/docs/lab/js/webtorrent.js b/docs/lab/js/webtorrent.js new file mode 100644 index 000000000..57f646149 --- /dev/null +++ b/docs/lab/js/webtorrent.js @@ -0,0 +1,16 @@ +var art = new Artplayer({ + container: '.artplayer-app', + url: 'magnet:?xt=urn:btih:6a9759bffd5c0af65319979fb7832189f4f3c35d&dn=sintel.mp4&tr=wss%3A%2F%2Ftracker.btorrent.xyz&tr=wss%3A%2F%2Ftracker.fastcast.nz&tr=wss%3A%2F%2Ftracker.openwebtorrent.com&tr=wss%3A%2F%2Ftracker.webtorrent.io&ws=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2Fsintel-1024-surround.mp4', + type: 'torrent', + customType: { + torrent: function (video, url) { + var client = new WebTorrent(); + client.add(url, function (torrent) { + var file = torrent.files[0]; + file.renderTo(video, { + autoplay: true + }) + }) + }, + }, +}); diff --git a/docs/lab/shaka.html b/docs/lab/shaka.html index a42f742ab..ffd8b2bf2 100644 --- a/docs/lab/shaka.html +++ b/docs/lab/shaka.html @@ -21,7 +21,7 @@
- + diff --git a/docs/lab/webtorrent.html b/docs/lab/webtorrent.html new file mode 100644 index 000000000..6ce01a3a5 --- /dev/null +++ b/docs/lab/webtorrent.html @@ -0,0 +1,60 @@ + + + + + ArtPlayer.js Lab + + + + + + + + + + + + + + +
+
+
+ + +
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + \ No newline at end of file