Skip to content
This repository has been archived by the owner on Dec 10, 2020. It is now read-only.

loadstart should fire during the resource selection algorithm #93

Merged
merged 3 commits into from
May 23, 2014
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified dist/video-js.swf
Binary file not shown.
8 changes: 5 additions & 3 deletions src/com/videojs/providers/HTTPVideoProvider.as
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package com.videojs.providers{

import com.videojs.VideoJSModel;
import com.videojs.events.VideoPlaybackEvent;
import com.videojs.structs.ExternalErrorEventName;
Expand Down Expand Up @@ -402,6 +402,10 @@ package com.videojs.providers{
}

private function initNetConnection():void{
// the video element triggers loadstart as soon as the resource selection algorithm selects a source
// this is somewhat later than that moment but relatively close
ExternalInterface.call('console.trace');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need this trace?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops.

_model.broadcastEventExternally(ExternalEventName.ON_LOAD_START);

if(_nc != null) {
try {
Expand Down Expand Up @@ -491,8 +495,6 @@ package com.videojs.providers{
_loadStartTimestamp = getTimer();
_throughputTimer.reset();
_throughputTimer.start();
_model.broadcastEventExternally(ExternalEventName.ON_LOAD_START);
_model.broadcastEventExternally(ExternalEventName.ON_BUFFER_EMPTY);
if(_pauseOnStart && _loadStarted == false){
_ns.pause();
_isPaused = true;
Expand Down