How to integrate YouTube video playback in Windows Mobile app

I need help building a Windows Mobile 6 app that can play YouTube videos with full control features.

I want to create an application that not only plays YouTube content but also lets me control playback and get information about the current video state, time position, and other status updates.

I have been researching this for weeks and tried several approaches but none worked properly. Here are the methods I attempted:

Embedded YouTube Player

  • Tried using HTML embed with JavaScript control
  • Problem: IE Mobile shows error about needing Flash Player 8 and JavaScript support
  • Cannot even view basic YouTube videos in the mobile browser

Windows Media Player Control

  • Attempted to host WMP control in my application
  • Issue: WMP will not play YouTube videos in any format, including mobile-optimized versions

DirectShow Integration

  • Currently investigating this option
  • Challenge: I have no experience with COM or DirectShow programming
  • Still searching for DirectShow components that support YouTube video formats

I prefer developing in C# but I am willing to use C++ if necessary. Any suggestions for making this work would be greatly appreciated.

Back when I was doing WM6 dev, I used the CorePlayer SDK instead of wrestling with YouTube’s web stuff. It handles way more video formats than WMP & embeds right into your C# app. The SDK gives you full control over playback, seeking, volume - everything. Just grab the actual video file URLs like others mentioned and feed them to CorePlayer. Way easier than DirectShow.

Windows Mobile 6’s streaming support is subpar, so I recommend downloading the videos locally rather than attempting to stream them. I created a background service that downloads YouTube videos and saves them to the device storage, allowing playback with standard Windows Media Player controls. This eliminates many issues associated with web streams. Look for a .NET Compact Framework port of youtube-dl to facilitate video downloads. Although it may consume storage space and take time to download, it ensures reliable playback and grants you full control. This approach is far more effective than trying to manage streaming protocols that WM6 can struggle with.

Try extracting the actual video stream URL from YouTube and feeding it directly to a media player component. When I worked on similar WM6 projects, I discovered YouTube serves different formats based on user agent and device capabilities. Parse the video page HTML or use their mobile API endpoints to grab the direct stream URL instead of embedding their player. Once you’ve got the stream URL, use Windows Media Player control or DirectShow for playback. The tricky bit is reliable URL extraction since YouTube changes their format constantly. You’ll need parsing logic that adapts to their page structure changes. This gives you way better control over playback functions than embedded solutions.

Try the .NET Compact Framework with P/Invoke calls to handle multimedia directly. I hit the same issues building media apps for WM6 devices back then. The breakthrough was skipping YouTube’s web interface completely and grabbing their mobile video feeds - they’re built for devices with limited resources. Build a custom HTTP client to pull video metadata and streaming URLs, then feed that to a native media renderer. The Windows Mobile SDK has sample code for custom media players you can use as a starting point. DirectShow’s overkill here - stick with the simpler Windows Media Format SDK components. They’re lightweight and actually designed for mobile dev. Just heads up that YouTube’s mobile formats from that time were pretty basic compared to now.