locked
connecting and running one same and single session of website page RRS feed

  • Question

  • User-458598543 posted

    hello,

    for my project, i want to develop and use a function that allows to connect and run one same and single session of website page for several users. for my case, i would like to play a video for several users in a or the same (direct) time.

    i used html and c# on aspx page. the video player that i used is windows media player library (dll).

    thanks for your contribution.

    marc-antoine or otherwhise rednuts72.

    Tuesday, May 5, 2020 5:31 PM

All replies

  • User415553908 posted

    If i get your problem statement correctly, I suspect it's not so much to do with session, but rather with synchronisation of playback events, which is likely not being sent to the server at all (meaning it's not part of your session state). I would suggest at looking into SignalR and some client side code to allow browsers to receive playback offsets. 

    Think someone like this Chat tutorial, but instead of messages of text your clients will exchange video timestamps and playback commands: https://docs.microsoft.com/en-us/aspnet/signalr/overview/getting-started/tutorial-getting-started-with-signalr

    Wednesday, May 6, 2020 12:17 AM
  • User-458598543 posted

    i'm trying with httpSession, the code is operational, i can play the video but when i'm launched a second page or a third page with the same url and the same http session variables, the video.src is loading but the control video doesn' playing.

    do you know where is the problem !

    thanks !

    code below :

    public HttpContext context = HttpContext.Current;

    private void session_http()
    {

    if (context.Session["video_2"] != null)
    {

    video_2 = (HtmlGenericControl)(context.Session["video_2"]);
    video_2.Attributes["autoplay"] = "autoplay";
    }
    else
    {
    video_2.Attributes["src"] = @"\audiovideo et audiopanavision\02 terra boina vivi.mp3";
    video_2.Attributes["autoplay"] = "autoplay";
    context.Session["video_2"] = video_2;
    }
    }

    Wednesday, August 12, 2020 3:31 PM