Closed farazhassan closed 10 years ago
How are you changing the video? I would invoke the open
method with the videoModel
, and then ensure the video is playing.
1) I can't find the documentation. This is the first time I'm looking at the open function. 2) I just added another video to the video service.
Ah I see. Yes, you should add another video via the playlist, and then open
it. Something like the following, where ngVideo
is your context:
var videoModel = ngVideo.addSource('mp4', 'http://www.w3schools.com/html/mov_bbb.mp4');
ngVideo.open(videoModel);
Nope. Says that its not a function of the video service(If i understood the context right, that refers to the video service I'm using inside my controller?)
I'll need to add a way to forcefully change the video to the recently added. Please leave it with me – I'll have you a release today to allow that.
Ohk sure. Thanks
Please update ngVideo
to 0.4.11
and try again by specifying the third parameter in your addSource
method:
video.addSource('mp4', $scope.videos.second, true);
If you're using the MultiSource
approach, then specify true
in the save
method.
Umm I'm not using the multisource approach right now. Im supposed to just replace the old addSource funciton with this? What does the third argument specify?
Just set the third argument in your addSource
method to true
to force the change of the video.
It does change the video for some time but eventually it just stops responding, shouldn't there be helper functions like remove all videos or something?
How do you mean it stops responding?
It forcefully changes the video exactly 5 times and then if you try to change it again, it stops responding, and the video wont change and the screen is black.
Pushed ngVideo#4.12.0
and added an example for you.
I have done exactly the same thing, lets see. Will close the issue when i have a working version.
Its working fine now. But it takes at least a second to change the video. Thanks
No problem! :beers: It will depend on your Internet connection, and you have to consider the time for the browser to load the video, and for it to buffer. Even cached videos will take a moment to load, depending on your connection.
I need to play a video depending on the URL. Like if it changes from .../video/1 to .../video/2, the player should play the video 2 instead of video one, in the controller, I update everything based on the $routeParams value, the view is changed, everything else works fine EXCEPT the video, it just doesn't load. Any ideas?