Fix Issue where auto-play keeps playing the same videos in a loop
This commit is contained in:
1 parent
ae37623756
commit
757bd50701
6 files changed
+74
-5
No files matched your search
@@ -1,3 +1,5 @@
|
||||
import "pkg:/source/utils/StringUtils.bs"
|
||||
|
||||
function GetLocalIpAddress() as string
|
||||
if m.ipAddress = invalid or m.ipAddress = ""
|
||||
di = CreateObject("roDeviceInfo")
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
import "pkg:/source/utils/General.bs"
|
||||
|
||||
class RingBuffer
|
||||
private array
|
||||
private size
|
||||
private index
|
||||
|
||||
function new(size as integer)
|
||||
m.array = CreateObject("roArray", size, false)
|
||||
m.size = size
|
||||
m.index = 0
|
||||
end function
|
||||
|
||||
function Push(tvalue As Dynamic)
|
||||
m.array[m.index] = tvalue
|
||||
m.index = (m.index + 1) MOD m.size
|
||||
end function
|
||||
|
||||
function Contains(tvalue As Dynamic) as boolean
|
||||
return ArrayIndexOf(m.array, tvalue) <> -1
|
||||
end function
|
||||
end class
|
||||
Reference in new issue
Block a user