I am having a problem with VideoJS where I am trying to play a video that I recorded to Kaltura, but I can only get it to display as a 100x100 pixel square video.
Steps:
- I record a video using Kaltura Recorder.
- Kaltura saves the video and fires an "AddEntryComplete" javascript message containing the Entry ID of the video
- When I receive the message, I access Kaltura's MediaService "Get" method, which retrieves the Flavor Assets.
- I then call FlavorAssetService.GetDownloadUrl(assetId, useCdn=true) to get the URL I am using for each asset returned
- I add the returned Urls as Sources on my VideoJS player and generate the player
The problem is, during the first few minutes after recording, the video shows up in the Player, but it is stuck as a 100x100pixel square.
The video player renders as an Adobe Flash Player of the size I specify with the small video in the upper left corner, and the rest of the area is black.
If I change the size of the Flash Player to be smaller then 100px (like say width=10% of 720 pixel wide player), the video is covered by the edge of the player field.
After a few minutes, the Kaltura FlavorAssetService.GetDownloadUrl starts returning multiple flavors. The VideoJS player at that time after refresh of the web page starts correctly displaying the mp4 version of the flavor.
Anyone have any idea how to either stretch the Flash video to fill the whole player, or if there is some other way I should be retrieving the URL for the Kaltura video?
Thanks!
update 12/17/14
In Chrome and IE11 (havent tried other browsers yet), there is no Duration time in the player - the time just counts up until it gets to the end of the video
In IE11, in addition to no duration time, I also get an error popup that I can click continue on to show the video player:
"TypeError: Error #1009: Cannot access a property or method of a null object reference. at com.videojs::VideoJSView/sizeVideoObject() at com.videojs::VideoJSView/onDimensionUpdate() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at com.videojs::VideoJSModel/broadcastEvent() at com.videojs.providers::HTTPVideoProvider/onNetStreamStatus()"
update 12/18/14 - Found that I can kind of set dimensions on the flash video by getting an instance of my player (myPlayer), and then in .ready's function, I can call this.dimensions(). This still keeps the video square, but with sample numbers I tried, I got a 450x450 pixel flash video that played - still without a duration time in the player though...
Here is the current code for :
var newPlayer = videojs(<parameters - can fill later if needed>);
newPlayer.ready(function () {
player.dimensions(640, 480); // --- changes the video size to 450x450
this.on("ended", function () {
videoEndedVideoJs();
});
});
update 12/22/14 It appears Kaltura's initial video is not coming back with any Metadata, according to an FLV viewer I found. I found that my Get call from Kaltura returns a duration. I can call newPlayer.duration to set the duration, but only in full Seconds. The player counts, but the seek bar extends to the right of the player.