flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Elstner (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLEX-34656) Incorrect NetStream states are corrupting OSMF 2.0 based VideoPlayers with local video files on iOS
Date Wed, 03 Dec 2014 18:17:12 GMT

    [ https://issues.apache.org/jira/browse/FLEX-34656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14233269#comment-14233269
] 

Konstantin Elstner commented on FLEX-34656:
-------------------------------------------

Maybe a related sub task:
https://issues.apache.org/jira/browse/FLEX-27490

Possible workaround:

Extend the:
spark.components.VideoPlayer

Add to the constructor:
setupMobileCase();


And add the following code:
    //
    //
    // On mobile platforms we are using stageVideo, stageVideo has an delayed VideoSurface
init-phase
    // so our netstream object will crash if we initially autoPlay the content, so wait until
the display is ready

    private var _autoDisplayFirstFrame:Boolean = false;
    private var _autoPlay:Boolean = false;

    private function setupMobileCase():void {
        _autoDisplayFirstFrame = autoDisplayFirstFrame;
        _autoPlay = autoPlay;

        autoDisplayFirstFrame = false;
        autoPlay = false;

        if (_autoPlay) addEventListener(VideoSurfaceEvent.RENDER_CHANGE, videoSurfaceHandler);
    }

    private function videoSurfaceHandler(event:VideoSurfaceEvent):void {
        LOG.debug("videoSurfaceHandler " + event.usesStageVideo);

        if (_autoDisplayFirstFrame && event.usesStageVideo) {
            callLater(play);
            removeEventListener(VideoSurfaceEvent.RENDER_CHANGE, videoSurfaceHandler);
        }
    }

> Incorrect NetStream states are corrupting OSMF 2.0 based VideoPlayers with local video
files on iOS
> ---------------------------------------------------------------------------------------------------
>
>                 Key: FLEX-34656
>                 URL: https://issues.apache.org/jira/browse/FLEX-34656
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Spark: VideoPlayer
>    Affects Versions: Apache Flex 4.13.0, Apache Flex 4.12.1
>         Environment: Apple iOS 7 & 8
>            Reporter: Konstantin Elstner
>
> Problem Description:
> Video player which are based on OSMF 2.0 will struggle about misleading NetStream states
when StageVideo is used and the following options are true:
> - autoDisplayFirstFrame
> and / or
> - autoPlay
> Steps to Reproduce:
> 1) Setup a project with a OSMF 2.0 or Flex SDK VideoDisplay / VideoPlayer based VideoPlayers
> 2) activate StageVideo
> 3) enable autoDisplayFirstFrame and / or autoPlay
> 4) Try to play a local mp4 file
> Actual Result:
> The NetStream object will reach this states:
> - NetStream.Play.Start
> - NetStream.Buffer.Full
> - NetStream.Play.Failed
> This happens because the VideoDisplay / video Object will switch between stageVideo and
software fallback
> Expected Result:
> The NetStream-Object should reach this states:
> - NetStream.Play.Start
> - NetStream.Buffer.Full
> etc.
> Any Workarounds:
> Disable autoDisplayFirstFrame, autoPlay wait until the netStream is attached to the stageVideo-Object
and start the playback afterwards.
> By the way:
> Playback via a progressive HTTP-Download is possible without any problem.
> Related Bug Report:
> https://bugbase.adobe.com/index.cfm?event=bug&id=3861698



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message