提交 47d848e9 编写于 作者: N nicolo.carpignoli

added event for video loaded

上级 7af4c281
......@@ -5908,11 +5908,18 @@ ARjs.Source.prototype.init = function(onReady, onError){
this.domElement.style.position = 'absolute'
this.domElement.style.top = '0px'
this.domElement.style.left = '0px'
this.domElement.style.zIndex = '-2'
this.domElement.style.zIndex = '-2'
this.domElement.setAttribute('id', 'arjs-video');
return this
function onSourceReady(){
document.body.appendChild(_this.domElement);
document.body.appendChild(_this.domElement);
window.addEventListener('arjs-video-loaded', function(ev) {console.log('ss',ev)})
window.dispatchEvent(new CustomEvent('arjs-video-loaded', {
detail: {
component: document.querySelector('#arjs-video'),
},
}));
_this.ready = true
此差异已折叠。
......@@ -5908,11 +5908,18 @@ ARjs.Source.prototype.init = function(onReady, onError){
this.domElement.style.position = 'absolute'
this.domElement.style.top = '0px'
this.domElement.style.left = '0px'
this.domElement.style.zIndex = '-2'
this.domElement.style.zIndex = '-2'
this.domElement.setAttribute('id', 'arjs-video');
return this
function onSourceReady(){
document.body.appendChild(_this.domElement);
document.body.appendChild(_this.domElement);
window.addEventListener('arjs-video-loaded', function(ev) {console.log('ss',ev)})
window.dispatchEvent(new CustomEvent('arjs-video-loaded', {
detail: {
component: document.querySelector('#arjs-video'),
},
}));
_this.ready = true
......@@ -3174,11 +3174,18 @@ ARjs.Source.prototype.init = function(onReady, onError){
this.domElement.style.position = 'absolute'
this.domElement.style.top = '0px'
this.domElement.style.left = '0px'
this.domElement.style.zIndex = '-2'
this.domElement.style.zIndex = '-2'
this.domElement.setAttribute('id', 'arjs-video');
return this
function onSourceReady(){
document.body.appendChild(_this.domElement);
document.body.appendChild(_this.domElement);
window.addEventListener('arjs-video-loaded', function(ev) {console.log('ss',ev)})
window.dispatchEvent(new CustomEvent('arjs-video-loaded', {
detail: {
component: document.querySelector('#arjs-video'),
},
}));
_this.ready = true
......
此差异已折叠。
此差异已折叠。
......@@ -54406,11 +54406,18 @@ ARjs.Source.prototype.init = function(onReady, onError){
this.domElement.style.position = 'absolute'
this.domElement.style.top = '0px'
this.domElement.style.left = '0px'
this.domElement.style.zIndex = '-2'
this.domElement.style.zIndex = '-2'
this.domElement.setAttribute('id', 'arjs-video');
return this
function onSourceReady(){
document.body.appendChild(_this.domElement);
document.body.appendChild(_this.domElement);
window.addEventListener('arjs-video-loaded', function(ev) {console.log('ss',ev)})
window.dispatchEvent(new CustomEvent('arjs-video-loaded', {
detail: {
component: document.querySelector('#arjs-video'),
},
}));
_this.ready = true
......@@ -72,11 +72,17 @@ ARjs.Source.prototype.init = function(onReady, onError){
this.domElement.style.position = 'absolute'
this.domElement.style.top = '0px'
this.domElement.style.left = '0px'
this.domElement.style.zIndex = '-2'
this.domElement.style.zIndex = '-2'
this.domElement.setAttribute('id', 'arjs-video');
return this
function onSourceReady(){
document.body.appendChild(_this.domElement);
document.body.appendChild(_this.domElement);
window.dispatchEvent(new CustomEvent('arjs-video-loaded', {
detail: {
component: document.querySelector('#arjs-video'),
},
}));
_this.ready = true
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册