start /stream.mp4 at most recent segment; fix chat refresh button size

このコミットが含まれているのは:
n9k 2021-05-17 07:58:42 +00:00
コミット 5c011472ec
3個のファイルの変更5行の追加5行の削除

ファイルの表示

@ -5,7 +5,7 @@ from website.utils.stream import _is_segment, _segment_number, _get_segments
SEGMENT = 'stream{number}.m4s'
CORRUPTING_SEGMENT = 'corrupt.m4s'
STREAM_TIMEOUT = HLS_TIME + 2 # consider the stream offline after this many seconds without a new segment
STREAM_TIMEOUT = HLS_TIME * 2 # consider the stream offline after this many seconds without a new segment
# TODO: uncommment this if it becomes useful
#
@ -100,7 +100,7 @@ STREAM_TIMEOUT = HLS_TIME + 2 # consider the stream offline after this many seco
# return chunk
def resolve_segment_offset(segment_offset=max(VIEW_COUNTING_PERIOD // HLS_TIME, 2)):
def resolve_segment_offset(segment_offset=1):
'''
Returns the number of the segment at `segment_offset` (1 is most recent segment)
'''

ファイルの表示

@ -96,12 +96,12 @@
<input id="token" type="hidden" name="token" value="{{ token }}">
<noscript><input type="hidden" name="users" value="0"></noscript>
<input type="checkbox" style="display:none;" name="debug">
<button class="hue-rotate" title="Refresh chat window" style="font-weight: bold;background: none;border: none;margin: 0;padding: 0;cursor: pointer;" type="submit" class="">🔄</button>
<button class="hue-rotate" title="Refresh chat window" style="font-weight: bold;background: none;border: none;margin: 0;padding: 0;cursor: pointer;font-size: 100%;" type="submit" class="">🔄</button>
</form>
<form target="users" action="/users" method="get" style="float: right;margin: 0;width: 1em;">
<input id="token" type="hidden" name="token" value="{{ token }}">
<input type="checkbox" style="display:none;" name="debug">
<button title="Refresh chat window" style="font-weight: bold;background: none;border: none;margin: 0;padding: 0;cursor: pointer;" type="submit" class="">🔄</button>
<button title="Refresh chat window" style="font-weight: bold;background: none;border: none;margin: 0;padding: 0;cursor: pointer;font-size: 100%;" type="submit" class="">🔄</button>
</form>
</div>
<div id="chat-window">

ファイルの表示

@ -212,4 +212,4 @@
var streamRelativeStart = {{ stream_start_rel_json }};
</script>
</body>
</html>
</html>