Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't execute "location.replace" when moving to next event (event.js) #4143

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions web/skins/classic/views/js/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -690,8 +690,8 @@ function streamNext(action) {
// How about we just reload the page?
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you decide to do it this way?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because I was lazy. Also much has changed since then.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now I'm transferring it to draft.
When I have time, I'll look at the code in more detail.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed the code and added some comments, applied use strict etc.

THe problem is that we might be coming from an event playing with zms to an event with video.js. We need to be able to update the actual player in js. At the time (the video.js stuff was new) it was easier to just reload. We didn't have fullscreen back then. ANyways, it shouldn't be a big deal now.

I want to transition the streaming code to an EventSTream.js module like MonitorStream. So it can be reused for montage etc. I have a need for that in the short term, so I will be working on that.

//
if (vid==null) streamReq({command: CMD_QUIT});
location.replace(thisUrl + '?view=event&eid=' + nextEventId + filterQuery + sortQuery);
return;
//location.replace(thisUrl + '?view=event&eid=' + nextEventId + filterQuery + sortQuery);
//return;
if (vid && ( NextEventDefVideoPath.indexOf('view_video') > 0 )) {
// on and staying with videojs
CurEventDefVideoPath = NextEventDefVideoPath;
Expand Down