Live Streaming Issue - windows-phone-7

I am developing an app to view live channels. Channels are hosted on Windows Media Services 9. I am using MediaElement for playing the stream and it is playing the stream first time but doesnt play on second attempt unless i relaunch the app.
Same problem with internet explorer on WP7 it plays the stream first time but not on second attempt.
Is it a bug? or is there any solution of this problem?

Are you using IIS Smooth Streaming? If not, why not? Considering you're developing for a mobile device that would need to scale to unknown network conditions adaptive streaming would be better than progressive download playback.
If you are using IIS Smooth Streaming on the server side, you shouldn't use < MediaElement Source="http://foo" /> but rather use the < ssme:SmoothStreamingMediaElement StreamSource="http://foo/bar.ism/manifest" /> control.
There's a lot of documentation out there on setting up an IIS smooth streaming endpoint and consuming it from WP7. You should also consider using the < smf:SmfPlayer /> control as it gives you a fully-featured WP7 video player and not just a playback rectangle like the mediaelements do.

Related

Core Audio code running on simulator mutes currently playing audio

Every time I'm working on a Core Audio application, specifically one that utilizes real-time audio via the remoteIO audio unit render callbacks, the moment I start the audio unit engine running whatever music I am playing via youtube or itunes is muted. I must reload the youtube page or reset my system preference audio settings to get sound back. Is there a solution to this?
Set the mix-with-others property on the Simulator's RemoteIO Audio Unit before starting it. Also enable a proper AVAudioSession category.

Stream YouTube videos in a Windows Phone app

How do I stream YouTube videos in a Windows Phone app? I've tried using the MediaElement control and setting its Source property with the URL to a video and called the Play() method on the media element, but it didn't work. I want to create a simple video player that plays a video as it is being streamed. What kind of .NET classes do I need to work with?
YouTube does not expose its videos in a format which you can use to play them within Windows Phone applications, or any other kind of application for that matter. This is why services such as KeepVid, which provide 'hacks' for downloading YouTube videos, exist.
Please see my answer to this identical question from a few months ago over # Possible to play Youtube video in a wp7 app?

How can my app playback videos like metro tube does for Windows Phone 7?

I have to code an Windows Phone 7 application which playback videos from YouTube. That's kind of normal, but the first approach it's to playback them in the same way as MetroTube does it (see http://www.metrotubeapp.com/ ) (for example you can playback the youtube video without going to fullscreen and also have playback controls)
I do not have any idea of how to achieve this so, perhaps an embedded page based on You tube video integration but not quite sure yet.
Any idea of how to create this very flexible YouTube player for WP7?

Accessing MediaPlayer in Background Agent in Windows Phone 7

I am trying to capture the current playing track in the Zune music player, in my Background Agent app. Looking at the Unsupported APIs for Background Agents page on MSDN, all of XNA is not supported - which means I can't use XNA's Media.MediaPlayer. Is there any workaround or solution for this?
Nope.
There is currently no way to access anything other than the tracks which you are playing in a BackgroundAudioPlayer agent.
Actually, there is no way to access anything other than THE track (not tracks) that the background audio player is playing. There is no concept of a playlist exposed by the BAP singleton, which apparently is the source for much frustration with this component. You have to resort to IsolatedStorage or some other hack to feed the BAP a playlist.

Playback and listen to recording device in FMOD

Is it possible to simultaneously playback the recording device by using the FMOD api? This functionality would be the same to what Windows offers in the recording device properties where you can enable "listen to this device" for certain recording devices. If this isn't possible via FMOD, is there another API more suited for this functionality?
You can achieve this with FMOD by simply recording with looping set to true, then play the recorded sound as looping also. Providing you separate your recordStart call and your playSound call by some time (say 10ms) the play cursor and the record cursor will follow each other and you will get realtime playback.
There is an example of this with the "recording" example that ships in the FMOD API for most platforms and there is a more advanced example on the Windows platform that shows adding realtime effects to a live recorded sound.

Resources