Skip to content

Playback Live stream from Custom youtube URL #712

Answered by ne0rrmatrix
ne0rrmatrix asked this question in Q&A
Discussion options

You must be logged in to vote

Ended up solving the problem myself :) This will grab the current live stream from a channel.
Example console app.
Just do: _ = LoadVideo();

This is my solution for getting the video URL for stream.

 using M3U8Parser;
using YoutubeExplode;

namespace ConsoleApp1;
public static class App
{
    private static YoutubeClient Youtube { get; set; } = new();
    private static HttpClient Client { get; set; } = new();
    private static List<YoutubeResolutions> Items { get; set; } = new();
    public static async Task Main() 
    {
        await LoadVideo();
        
    }

    /// <summary>
    /// Method Starts <see cref="MediaElement"/> Playback.
    /// </summary>
    /// <returns></returns>…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ne0rrmatrix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant