Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cfinke/Channel-Two
/ functions
Functions
27 in github.com/cfinke/Channel-Two
⨍
Functions
27
◇
Types & classes
0
↓ 10 callers
Function
add_base
( $path )
parse-schedule.php:307
↓ 6 callers
Function
queueNextProgramming
()
channel-two.js:473
↓ 3 callers
Function
getNextContentFromCron
* Given a cron pattern, find the next video that should be played. * For a file or URL, it's the file or URL. For a directory, it's the video that c
channel-two.js:692
↓ 3 callers
Function
index_file
* Index a given file and its metadata. */
parse-schedule.php:220
↓ 2 callers
Function
adBreak
* Potentially take a break for some ads. * * @return bool Whether a break was scheduled and taken.
channel-two.js:342
↓ 2 callers
Function
decodePathParts
* Decode the individual directories and filenames in a path without encoding the slashes.
channel-two.js:1201
↓ 2 callers
Function
encodePathParts
* Encode the individual directories and filenames in a path without encoding the slashes.
channel-two.js:1179
↓ 2 callers
Function
files_in_dir_deep
* Find all files in a given directory, including files within subfolders (and their subfolders, etc.) */
parse-schedule.php:260
↓ 2 callers
Function
getLastPlay
( cron )
channel-two.js:923
↓ 2 callers
Function
getPlayHistory
* Get the stored play history -- a hash keyed by cron pattern containing the last video path that finished (or was interrupted). * * @return Objec
channel-two.js:883
↓ 2 callers
Function
play
* Play a given file in the video player.
channel-two.js:573
↓ 2 callers
Function
saveLastPlay
( cron, file )
channel-two.js:915
↓ 2 callers
Function
secondsLeftInCurrentProgram
()
channel-two.js:1070
↓ 2 callers
Function
setCaptionStatus
()
channel-two.js:663
↓ 1 callers
Function
addCaptions
( path )
channel-two.js:642
↓ 1 callers
Function
existing_duration
( $path )
parse-schedule.php:59
↓ 1 callers
Function
getCaptions
* If a caption file is available for a file, return its path. * * @return int|bool The duration, or false if not available.
channel-two.js:983
↓ 1 callers
Function
getDuration
* Find the duration, in seconds, of a given file. * * @return int|bool The duration, or false if not available.
channel-two.js:940
↓ 1 callers
Function
getPreviousContentFromCron
* Given a cron pattern, find the previous video that would have played. * For a file or URL, it's the file or URL. For a directory, it's the video t
channel-two.js:788
↓ 1 callers
Function
get_duration
* Find the duration in seconds of a given video file. * * @param string $file A file path. * @return int|bool Either the duration or false. */
parse-schedule.php:290
↓ 1 callers
Function
purgeDurations
* Remove any stored durations for files that are no longer in the programming indices.
channel-two.js:1038
↓ 1 callers
Function
resized
* Resize various elements when the screen is resized (and when it's loaded).
channel-two.js:1131
↓ 1 callers
Function
saveDuration
* Save the duration of a file that didn't have a stored duration in programming.js * * @param string filePath * @param float duration * @retur
channel-two.js:1006
↓ 1 callers
Function
secondsUntilNextProgram
()
channel-two.js:1090
↓ 1 callers
Function
setPlayHistory
* Save the playHistory
channel-two.js:900
Function
refreshProgramming
* Re-fetch the JavaScript file that was generated from the cron schedule, which updates * the local `programming` variable. This allows the schedule
channel-two.js:1160
Function
watchForCommercialBreak
* Watch for moments during programming when the screen fades to black, and use that as an * opportunity for a commercial break, if applicable.
channel-two.js:236