[Vuejs]-Cordova app not open azure media player video

0đź‘Ť

It seems to me that this issue is caused due to window.amp being available on the browser but not being available on Android.

From TypeScript’s documentation

Sometimes you’ll end up in a situation where you’ll know more about a value than TypeScript does. Usually this will happen when you know the type of some entity could be more specific than its current type.

Type assertions are a way to tell the compiler “trust me, I know what
I’m doing.” A type assertion is like a type cast in other languages,
but performs no special checking or restructuring of data. It has no
runtime impact, and is used purely by the compiler. TypeScript assumes
that you, the programmer, have performed any special checks that you
need.

Rewrite window.amp as (<any>window).amp

0đź‘Ť

Following up on my problem. I created a js and css file with the content of azure media player and changed the link in my index:

<link href="statics/amp.css" rel="stylesheet">
<script src="statics/amp.js"></script>

That way I do load my javascript without problems so it seems that the problem was in the access to the source of origin:
//amp.azure.net/libs/amp/2.3.0/azuremediaplayer.min.js

I must analyze as there seems to be a problem with the cordova whitelist plugin

Leave a comment