I'm using videogular in my angular SPA application, i'm keep getting the error "Unable to set property 'playsInline' of undefined or null reference" for some videos though I'm setting the src with proper video files. It works fine for some files. All the files are of .mp4 type.
Did anyone face this issue, if so what did you do to fix it
Js:
$scope.config = {
sources: [
{ src: videoLoc, type: 'video/mp4' }
],
theme: '/Content/css/videogular.css',
plugins: {
poster: $scope.productinfo.trailerlist[i].stillimage['targeturl']
}
};
HTML:
<videogular vg-theme="config.theme" vg-player-ready="controller.onPlayerReady($API)">
<vg-media vg-src="config.sources"></vg-media>
<vg-controls>
<vg-play-pause-button></vg-play-pause-button>
<vg-time-display>{{ currentTime | date:'mm:ss'}}</vg-time-display>
<vg-scrub-bar>
<vg-scrub-bar-current-time></vg-scrub-bar-current-time>
</vg-scrub-bar>
<vg-time-display>{{ timeLeft | date:'mm:ss' }}</vg-time-display>
<vg-volume>
<vg-mute-button></vg-mute-button>
<vg-volume-bar></vg-volume-bar>
</vg-volume>
</vg-controls>
<vg-overlay-play></vg-overlay-play>
<vg-poster vg-url='config.plugins.poster'></vg-poster>
</videogular>