bugfix and andrey fix and better docs
This commit is contained in:
parent
e70803814d
commit
a64f513eee
1 changed files with 5 additions and 7 deletions
|
@ -77,8 +77,8 @@ if (window.localStorage.getItem(SHARE_INTERNAL) === 'true') internalAnalyticsEna
|
||||||
// @endif
|
// @endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine the mobile operating system.
|
* Determine the mobile device type viewing the data
|
||||||
* This function returns one of 'iOS', 'Android', 'Windows Phone', or 'unknown'.
|
* This function returns one of 'and' (Android), 'ios', or 'web'.
|
||||||
*
|
*
|
||||||
* @returns {String}
|
* @returns {String}
|
||||||
*/
|
*/
|
||||||
|
@ -120,7 +120,7 @@ async function sendAndResetWatchmanData() {
|
||||||
const objectToSend = {
|
const objectToSend = {
|
||||||
rebuf_count: amountOfBufferEvents,
|
rebuf_count: amountOfBufferEvents,
|
||||||
rebuf_duration: amountOfBufferTimeInMS,
|
rebuf_duration: amountOfBufferTimeInMS,
|
||||||
url: claimUrl,
|
url: claimUrl.replace('lbry://', ''),
|
||||||
device: getDeviceType(),
|
device: getDeviceType(),
|
||||||
duration: Math.round(durationInSeconds) * 1000,
|
duration: Math.round(durationInSeconds) * 1000,
|
||||||
protocol,
|
protocol,
|
||||||
|
@ -182,12 +182,10 @@ const analytics: Analytics = {
|
||||||
// TODO: clear data here
|
// TODO: clear data here
|
||||||
},
|
},
|
||||||
videoIsPlaying: (isPlaying, passedPlayer) => {
|
videoIsPlaying: (isPlaying, passedPlayer) => {
|
||||||
var playerToUse = videoPlayer || passedPlayer;
|
|
||||||
|
|
||||||
// have to use this because videojs pauses/unpauses during seek
|
// have to use this because videojs pauses/unpauses during seek
|
||||||
// sometimes the seeking function isn't populated yet so check for it as well
|
// sometimes the seeking function isn't populated yet so check for it as well
|
||||||
if(playerToUse && playerToUse.seeking){
|
if (passedPlayer && passedPlayer.seeking) {
|
||||||
var playerIsSeeking = playerToUse.seeking();
|
var playerIsSeeking = passedPlayer.seeking();
|
||||||
}
|
}
|
||||||
|
|
||||||
// if player isn't seeking it's not a seeking caused start or pause
|
// if player isn't seeking it's not a seeking caused start or pause
|
||||||
|
|
Loading…
Reference in a new issue