Playing videos sequentially - windows-phone-7

I want to play video in WP7.
This is my code:
MediaPlayerLauncher player = new MediaPlayerLauncher();
player.Media = new Uri("video link", UriKind.RelativeOrAbsolute);
player.Location = MediaLocationType.Data;
player.Controls = MediaPlaybackControls.All;
player.Show();
This is working fine.
After finishing this video I want to continue playing another video. I want to play two videos one after another.
Is this possible in WP7? How can I accomplish this?

The title asks how to play videos in general. Are you aware of the MediaElement? It can be used to play back video as well and it has an event telling you when video playback ends. And it can also give you the video length.
This blog post has an example of both MediaElement and MediaPlayerLauncher.

The MediaPlayerLauncher does not expose an event or callback for you to find out if and/or when the video has ended. I am afraid it is not possible to hook into these events.

Related

Agora switch from audio to video call during voice call

I have implemented Agora Web SDK for calling and its working great in Laravel and Vue.js.
I want to know if there is any way to switch from audio to video call while having audio call.
If I createStream with video = false then it is only audio call but I cannot change it to switch to video call using rtc.localStream.unmuteVideo() because it requires video = true to make it work
If I createStream with video = true then I turn of the camera using rtc.localStream.muteVideo(). So it turns off the camera and user can turn it on when required. But camera light is still on.
// create local stream
this.rtc.localStream = AgoraRTC.createStream({
streamID: this.rtc.params.uid,
audio: true,
video: true,
screen: false,
microphoneId: this.option.microphoneId,
cameraId: this.option.cameraId
});
Which means it is still a video call but video track is just a blank screen.
I am looking for a way where I can remove the only audio call stream and add audio-video call stream without interruption.
I have looked into Agora docs but I couldnt find anything about it.
I think once a stream is created then cannot change video to true or false.
UPDATE:
After reading Hermes' answer. I did some RnD and found some useful events.
Trick is same as mentioned in answer.
To change call from screen <=> audio <=> video <=> screen.
Unpublish the local stream using
Create new stream to add/remove video or screen sharing
wait for old local stream to be unpublished and init the new stream and publish it.
Above 3 steps will trigger AGORA events
client.unpublish triggers stream-removed event
publish triggers stream-added event . In this event listener, subscribe to new stream. When you subscribe to new stream then stream-subscribed event is triggered.
On the basis of these events, you can update the ui and (local, remote) streams as well.
The best way to handle this is to use two Agora stream objects.
First create the audio only stream, and publish it using client.publish. Then when you want to change to a video call, \ then call client.unpublish on the the audio stream and create a second stream with video option enabled and call client.publish with the video stream.
There will be only a momentary interruption as the one stream is unpublished and then new one is published to the channel.

Can I add a poster to the audio player?

I'd like to add a poster to my audio player previews just like with the video mode of the mediaelement.js player.
I've checked all the shortcodes and there doesn't seem to be anything for this. Basically all I want is a static image immediately above the audio player that is visible before and during playing.
The reason I want this to be an 'all-in-one' player is because my WP theme allows me to create posts in the 'audio' format so that the audio player appears at the top of my category view of recent posts. It'd be awesome to add that image for each post and have it part of the audio player. Kind of like video but with less overhead.
Thanks in advance.

Can I get VLC or other media player to output information to an external program in real time?

My scenario is this:
I want to play a TV show or a movie on some media player. I want to be able to run a custom program that can get real time info - for example, the current timestamp, percentage of video left etc. - from this player.
My aim is that with this program running, I can annotate my video watching experience. Maybe take screencaps at the touch of a button, or mark a timestamp as the onset of a joke or something like that. Can media players be queried for this information while they're playing video? I imagine VLC would be the best bet here.
You can talk to VLC through the VLC HTTP API:
http://wiki.videolan.org/VLC_HTTP_requests
In particular /requests/status.xml has all the playback information that is desired.

How to generate video from photos with animation on server?

Good day!
I create programm for server, which should generate a video clip of the photos. The user sends photos to the server and the server generates a video with animation and sound track from this photos. I use ffmpeg for creation video, but how to create animation?. I need different (difficult) animation: transitions (fade in, fade out, scroll), zooming, animations numbers etc.
This example explains what I need.
Thanks
You should certainly check the MLT framework. It is used by many video editors, and supports different transitions in a quite easy form.
Check also Openshot which is video editing software written in Python. It also uses MLT framework, and due to being written in Python the code is rather easy to read.

How to save video into Camera Roll

Can I use this code to save a recorded video in the Camera Roll?
Medialibrary.SavePictureToCameraRoll(fileName, Stream);
where Stream is photo stream or video stream.
You can't save videos in the camera roll from a third party application at the moment. That API can be used just to save pictures.
Apparently it is. Have you tried it yet?
A quick google's come up with this:
http://wp.qmatteoq.com/how-to-save-a-picture-captured-with-the-new-cameras-api-in-the-camera-roll-in-windows-phone-8/

Resources