MCPcopy Create free account
hub / github.com/cfinke/Channel-Two / secondsLeftInCurrentProgram

Function secondsLeftInCurrentProgram

channel-two.js:1070–1088  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1068 }
1069
1070 function secondsLeftInCurrentProgram() {
1071 if ( logLevel >= 2 ) console.log( "secondsLeftInCurrentProgram()" );
1072
1073 let duration = tvElement.duration;
1074
1075 if ( logLevel >= 2 ) console.log( "The current program duration is " + duration + " seconds." );
1076
1077 if ( duration ) {
1078 let currentTime = tvElement.currentTime;
1079
1080 if ( logLevel >= 2 ) console.log( "The current program timestamp is " + currentTime );
1081
1082 if ( currentTime ) {
1083 return duration - currentTime;
1084 }
1085 }
1086
1087 return false;
1088 }
1089
1090 function secondsUntilNextProgram() {
1091 if ( logLevel >= 2 ) console.log( "secondsUntilNextProgram()" );

Callers 2

adBreakFunction · 0.85
channel-two.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected