I have an app made in VueJS with Quasar framework that has a tag that opens an Azure Media Player video. It works perfectly in the browser but when compiling with cordova for android it doesn't play the video in the apk, apparently it doesn't load the JavaScript:
<link href="//amp.azure.net/libs/amp/2.3.0/skins/amp-default/azuremediaplayer.min.css" rel="stylesheet">
<script src="//amp.azure.net/libs/amp/2.3.0/azuremediaplayer.min.js" onload="alert('Cargo el amp')"></script>
This is the method I use to load the video:
loadVideo () {
alert('Entro al load video')
alert('Variable window ' + JSON.stringify(window.amp))
const myPlayer = window.amp(this.idVideo, { /* Options */
techOrder: ['azureHtml5JS', 'flashSS', 'html5FairPlayHLS', 'silverlightSS', 'html5'],
'nativeControlsForTouch': false,
autoplay: true,
controls: true,
// width: '328',
// height: '202',
poster: '',
fluid: true
}, function () {
console.log('Good to go!')
// add an event listener
alert("Good to go!'")
this.addEventListener('ended', function () {
console.log('Finished!')
alert('Finished')
})
this.addEventListener('error', function () {
var errorDetails = myPlayer.error()
var code = errorDetails.code
var message = errorDetails.message
alert('Hay error ' + code + message)
})
}
)
myPlayer.src([{
src: this.srcVideoDialog,
type: 'application/vnd.ms-sstr+xml'
}])
}
As you can see I put alerts to know at what point it enters but does not get to load the function window.amp I hope someone has found the solution to this !!!
regards