Player dilemma and heatmap question

Helen Zhukova
LIVE4 GoPro
Published in
3 min readMar 24, 2015

I have the idea of changes, but Anton thinks that it may have some troubles with page loading. To explain the deal I have to start from what we have and then proceed to what I want it to be.

Now we have “Explore” page with some number of videos. Those videos now are just posters untill you activate them. And this is the question. Now you activate and create new player each time you click on poster. If you go to the second video from the first one you deactivate the first video and activate the second one, and if you want to go back to the first video you do the same. So in those 3 clicks you create a new player instance 3 times.

What I am thinking about is not to create a new player instance each time, but just hide paused video under a poster. I really like that returning to first video is much faster than now and I can resume playback from where I stopped.

But Anton says, that I create too many sever connections when I don’t destroy the first player instance and with that I can cause page loading problems as described in this article http://sgdev-blog.blogspot.com/2014/01/maximum-concurrent-connection-to-same.html. I’ve read this article carefully and I think that paused player doesn’t try to connect to server, so I need your professional technical opinion if our paused players make requests to server and in this way could cause “too many connections” problem. And considering UI benefits is there way, and do this benefits worth taking efforts to solve “too many connections” problem as I think this two features (not creating a new player instance each time and server request) could be handled together.

If Anton be so kind to publish my version to qa.live4.io I would greatly appreciate your participation in my “player dilemma”.

And my second question, that is somehow related but is independent itself, is “heatmap problem”.

Now we have videos that don’t have heatmaps, I think this is directly related with the absence of location in such videos. Heatmap itself (as I figured out from server code) generates from speed data, but speed is impossible without location (as I remember).

If we want to play one of the videos without heatmap we constantly get 404 error because code tries to get heatmap from server every second after previous fail attempt.

And that does make many server connections ;)

Furthermore, we have some kind of “workaround” that tries not get this error but I don’t think it succeed.

This message (to the right) is the same 404 error from all streams (even with heatmaps) caused by the code, that replaces this line (bold) <img alt=”heat map” class=”live4player-navigation-progressbar-heatmap loaded” src=”/heatmap/1120269701332106/GOPRO20150323233148.MP4/43.png”>

with this line player.setHeatmapSrc(“”); (SteamView.js line 307) and even when player destroys with this line el.querySelector(“.playerHolder”).innerHTML = “”; (SteamView.js line 310) setHeatmapSrc is still trying to load the heatmap (and fails).

My offers are:

1 — again do not create new player instances (for above mentioned reasons and this won’t do this player.setHeatmapSrc(“”); with dead players);

2 — do not load heatmap for steam which location is hidden (as we’ll never generate heatmap for it)

Please share your thoughts about this with me (and excuse my english as I read more that write or talk).

--

--