I have to use webkit-playsinline for the video tag, so I add the HTML widegt include such as"<video webkit-playsinline=true>" into the scene.
And next I use a touch event to trigger video playing, but when I use hype.Document.getElementById or doucument.getElementById to select the video id, it does not work.
So How can I find the video’s ID in the HTML widegt?
In the playV() function , we drill down into the widget. document->theWidget–>iframe->iframe document->video element.
var iframe= hypeDocument.getElementById('theWidget').children[0];
var iframeDocument = iframe.contentDocument || iframe.contentWindow.document;
var myVid = iframeDocument.getElementById('myVideo')
myVid.play()
Using a Rectangle shape:
The Rectangle’s innerHTML is edited to get the same video element