Apache Flex 4.16.1 API Reference | All Packages | All Classes | Index | Frames No Frames |
DynamicStreamingVideoItem

Package | spark.components.mediaClasses
Class | public class DynamicStreamingVideoItem
Inheritance | DynamicStreamingVideoItem Object

Language Version : | ActionScript 3.0

Product Version : | Flex 4

Runtime Versions : | Flash Player 10, AIR 1.5

The DynamicStreamingVideoItem class represents a video stream on the server plus a bitrate for that stream. Use this class to define the values of the `streamItems` property of the DynamicStreamingVideoSource class. The DynamicStreamingVideoSource class represents a streaming video source and can be used for streaming pre-recorded video or live streaming video.

MXML Syntax Show MXML Syntax
Hide MXML Syntax

The `<s:DynamicStreamingVideoItem>` tag inherits all of the tag attributes of its superclass and adds the following tag attributes:

      <s:DynamicStreamingVideoItem
        Properties
        bitrate="0"
        streamName=""
      />

View the examples

See also

spark.components.VideoPlayer
spark.components.VideoDisplay
spark.components.mediaClasses.DynamicStreamingVideoSource

Public Properties

| Property | Defined By
--- | --- | ---
|  | bitrate : Number The bit rate for the video stream. | DynamicStreamingVideoItem
|  | streamName : String The stream name on the server. | DynamicStreamingVideoItem

Public Methods

| Method | Defined By
--- | --- | ---
|  | DynamicStreamingVideoItem() Constructor. | DynamicStreamingVideoItem

Property Detail

bitrate | property

`bitrate:Number`

Language Version : | ActionScript 3.0

Product Version : | Flex 4

Runtime Versions : | Flash Player 10, AIR 1.5

The bit rate for the video stream.

The default value is `0`.

Implementation
`public function get bitrate():Number`
`public function set bitrate(value:Number):void`

streamName | property |

`streamName:String`

Language Version : | ActionScript 3.0

Product Version : | Flex 4

Runtime Versions : | Flash Player 10, AIR 1.5

The stream name on the server. Use the `host` property of the DynamicStreamingVideoSource class to specify the URI of the server.

Implementation
`public function get streamName():String`
`public function set streamName(value:String):void`

See also

spark.components.mediaClasses.DynamicStreamingVideoSource.host
Constructor Detail

DynamicStreamingVideoItem | () | Constructor

`public function DynamicStreamingVideoItem()`

Language Version : | ActionScript 3.0

Product Version : | Flex 4

Runtime Versions : | Flash Player 10, AIR 1.5

Constructor.

Examples
DynamicStreamingVideoSourceExample.mxml

    <?xml version="1.0"?>
    <!--

      Licensed to the Apache Software Foundation (ASF) under one or more
      contributor license agreements.  See the NOTICE file distributed with
      this work for additional information regarding copyright ownership.
      The ASF licenses this file to You under the Apache License, Version 2.0
      (the "License"); you may not use this file except in compliance with
      the License.  You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.

    -->
    <!-- Simple example to demonstrate the Spark DynamicStreamingVideoSource control -->
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark"
            xmlns:mx="library://ns.adobe.com/flex/halo">

        <s:Panel title="Spark DynamicStreamingVideoSource Example"
                width="75%" height="75%"
                horizontalCenter="0" verticalCenter="0">

            <s:VGroup left="10" right="10" top="10" bottom="10">

                <s:Label text="The DynamicStreamingVideoSource object contains multiple stream items. Flash Player automatically play the stream with the highest bit rate."
                    color="blue"
                    width="75%"/>

                <s:VideoPlayer id="myPlayer"
                    width="75%" height="75%"
                    autoPlay="false">
                    <s:source>
                        <s:DynamicStreamingVideoSource id="mySVS"
                            host="rtmp://fmsexamples.adobe.com/vod/">
                            <s:DynamicStreamingVideoItem id="dreamgirl150"
                                streamName="MP4:_PS_dreamgirl_150.f4v"
                                bitrate="150" />
                            <s:DynamicStreamingVideoItem id="dreamgirl500"
                                streamName="MP4:_PS_dreamgirl_500.f4v"
                                bitrate="500" />
                            <s:DynamicStreamingVideoItem id="dreamgirl1000"
                                streamName="MP4:_PS_dreamgirl_1000.f4v"
                                bitrate="1000" />
                        </s:DynamicStreamingVideoSource>
                    </s:source>
                </s:VideoPlayer>
            </s:VGroup>
        </s:Panel>
    </s:Application>

Wed Nov 15 2017, 09:50 AM +01:00