mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-18 10:41:20 -08:00
成功读取tags
This commit is contained in:
1 parent
52458bb95e
commit
3a50f7ea86
8 files changed
+170
-18
No files matched your search
+12
-7
@@ -1,11 +1,11 @@
|
||||
'use strict';
|
||||
|
||||
(function() {
|
||||
consola.creat({
|
||||
target: '.part-bottom',
|
||||
size: '100%',
|
||||
zIndex: 99,
|
||||
});
|
||||
// consola.creat({
|
||||
// target: '.part-bottom',
|
||||
// size: '100%',
|
||||
// zIndex: 99,
|
||||
// });
|
||||
|
||||
console.info('Welcome, if you like it, consider star it, thank you.');
|
||||
console.info('https://github.com/zhw2590582/ArtPlayer');
|
||||
@@ -16,8 +16,9 @@
|
||||
|
||||
var $urlInput = document.querySelector('.urlInput');
|
||||
var $playBtn = document.querySelector('.playBtn');
|
||||
var $fileBtn = document.querySelector('.fileBtn');
|
||||
|
||||
function creatPlayer() {
|
||||
function creatPlayer(file) {
|
||||
Artplayer.instances.forEach(function(art) {
|
||||
art.destroy(true);
|
||||
});
|
||||
@@ -28,7 +29,7 @@
|
||||
type: 'flv',
|
||||
customType: {
|
||||
flv: function(video, url) {
|
||||
this.plugins.artplayerPluginFlv.init(video, url);
|
||||
this.plugins.artplayerPluginFlv.init(video, file || url);
|
||||
},
|
||||
},
|
||||
plugins: [artplayerPluginFlv]
|
||||
@@ -37,4 +38,8 @@
|
||||
|
||||
creatPlayer();
|
||||
$playBtn.addEventListener('click', creatPlayer);
|
||||
$fileBtn.addEventListener('change', () => {
|
||||
const file = $fileBtn.files[0];
|
||||
creatPlayer(file);
|
||||
});
|
||||
})();
|
||||
Reference in new issue
Block a user