I am trying to use an Object URL with Videogular and a 0 second video shows up. Here is the code I am trying to use:
$http.get("/Video/small.mp4").success(function(data) {
var blob = new Blob([data], { type: 'video/mp4' })
val objectUrl = URL.createObjectURL(blob)
controller.config.sources =
[{ src: $sce.trustAsResourceUrl(objectUrl), type: "video/mp4" }]
});
If I don't use an Object URL then everything works as expected:
controller.config.sources = [
{ src: $sce.trustAsResourceUrl("/Video/small.mp4"), type: "video/mp4" }
]
I am eventually going to store the video in indexeddb which is why I am interested in playing the video using an Object URL.