mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-26 08:51:20 -08:00
demo bugFix
This commit is contained in:
1 parent
3b138f126b
commit
6b8e92681e
2 files changed
+9
-3
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
var art = new Artplayer({
|
var art = new Artplayer({
|
||||||
container: '.artplayer-app',
|
container: '.artplayer-app',
|
||||||
url: '/assets/sample/video.mp4',
|
url: 'https://artplayer.org/assets/sample/video.mp4',
|
||||||
autoSize: true,
|
autoSize: true,
|
||||||
setting: true,
|
setting: true,
|
||||||
playbackRate: true,
|
playbackRate: true,
|
||||||
|
|||||||
@@ -36,6 +36,11 @@
|
|||||||
monaco.languages.typescript.javascriptDefaults.addExtraLib(libSource, libUri);
|
monaco.languages.typescript.javascriptDefaults.addExtraLib(libSource, libUri);
|
||||||
monaco.editor.createModel(libSource, 'typescript', monaco.Uri.parse(libUri));
|
monaco.editor.createModel(libSource, 'typescript', monaco.Uri.parse(libUri));
|
||||||
|
|
||||||
|
var disposable = monaco.editor.onDidCreateEditor(function () {
|
||||||
|
disposable.dispose();
|
||||||
|
setTimeout(initApp, 1000);
|
||||||
|
});
|
||||||
|
|
||||||
editor = monaco.editor.create($codeMirror, {
|
editor = monaco.editor.create($codeMirror, {
|
||||||
theme: 'vs-dark',
|
theme: 'vs-dark',
|
||||||
automaticLayout: true,
|
automaticLayout: true,
|
||||||
@@ -44,8 +49,6 @@
|
|||||||
'javascript',
|
'javascript',
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
|
|
||||||
initApp();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -78,10 +81,13 @@
|
|||||||
|
|
||||||
function loadScript(url) {
|
function loadScript(url) {
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
|
var define2 = window.define;
|
||||||
|
window.define = undefined;
|
||||||
var script = document.createElement('script');
|
var script = document.createElement('script');
|
||||||
script.type = 'text/javascript';
|
script.type = 'text/javascript';
|
||||||
script.src = url;
|
script.src = url;
|
||||||
script.onload = function () {
|
script.onload = function () {
|
||||||
|
window.define = define2;
|
||||||
resolve(url);
|
resolve(url);
|
||||||
};
|
};
|
||||||
script.onerror = function () {
|
script.onerror = function () {
|
||||||
|
|||||||
Reference in new issue
Block a user