shared/js/media/video_player.js
// Compute position based on player orientation
Compute position based on player orientation
Compute position based on player orientation
function computePosition(panPosition, rect) {
    var position;
    switch (orientation) {
      case 0:
        position = (panPosition.clientX - rect.left) / rect.width;
        break;
      case 90:
        position = (rect.bottom - panPosition.clientY) / rect.height;
        break;
      case 180:
        position = (rect.right - panPosition.clientX) / rect.width;
        break;
      case 270:
        position = (panPosition.clientY - rect.top) / rect.height;
        break;
    }
    return position;
  }
function computePosition ( panPosition , rect ) { var position ; switch ( orientation ) { case 0 : position = ( panPosition . clientX - rect . left ) / rect . width ; break ; case 90 : position = ( rect . bottom - panPosition . clientY ) / rect . height ; break ; case 180 : position = ( rect . right - panPosition . clientX ) / rect . width ; break ; case 270 : position = ( panPosition . clientY - rect . top ) / rect . height ; break ; } return position ; }
Compute position based on player orientation
Compute position based on player orientation