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).
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.
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.
Member
62 Points
233 Posts
connecting and running one same and single session of website page
May 05, 2020 05:31 PM|Rednuts72|LINK
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.
Member
160 Points
96 Posts
Re: connecting and running one same and single session of website page
May 06, 2020 12:17 AM|timur.kh|LINK
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
Member
62 Points
233 Posts
Re: connecting and running one same and single session of website page
Aug 12, 2020 03:31 PM|Rednuts72|LINK
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;
}
}