Cisco StadiumVision Mobile API for Windows Phone
This module describes the Cisco StadiumVision Mobile SDK Release 2.1.1 for Windows Phone and contains the following sections:
- Introduction to Cisco StadiumVision Mobile SDK for Windows Phone
- Restrictions for the Cisco StadiumVision Mobile SDK for Windows Phone
- Download and Unpack the SDK
- Get Started with the Windows Demo App
- Cisco StadiumVision Mobile Methods and Functions for Windows
- Add Cisco StadiumVision Mobile Services to a Windows App—Code Structure and Samples
- Integrate EVS C-Cast
Introduction to Cisco StadiumVision Mobile SDK for Windows Phone
The Cisco StadiumVision Mobile Windows SDK contains the following components bundled together:
- .NET components, configuration files, player and layout XML files
- Windows Demo app with SDK video player
- API documentation (Doxygen build)
The API uses .NET classes on Windows to access the Cisco StadiumVision Mobile data distribution and video playback functionality within the Cisco StadiumVision Mobile Windows SDK library. DirectX is used to display video in a SwapChainPanel XAML element. Due to the .NET interface, the Cisco StadiumVision Mobile API can be called by C#/XAML client applications.
Mobile OS Support describes the mobile operating system versions supported by the Cisco StadiumVision Mobile SDK.
For additional information, refer to the Cisco StadiumVision Mobile Release Notes available from Cisco.com at:
http://www.cisco.com/c/en/us/support/video/stadiumvision/products-release-notes-list.html
Restrictions for the Cisco StadiumVision Mobile SDK for Windows Phone
Before you begin using the Cisco StadiumVision Mobile SDK for Windows Phone, consider the following restrictions:
- Cisco StadiumVision Mobile client application is designed for Windows Phones 8.1 and later, it is also supported on ARM processor-powered devices. It is not supported on Windows Phones 8.0 and earlier, all tablets, and x86 phone platforms. This means that the Windows Phone Emulator in Visual Studio is not supported because the emulator operates in x86 mode.
- Windows version 8.1 is required if using a Mac. We recommend using BootCamp, however there are multiple ways to emulate a Windows environment (such as virtual machine window or VMWare Fusion) that haven’t been tested.
- HTML/Javascript is not supported.
Build Environment Requirements lists the various build environment requirements.
Development tools: Visual Studio 2013, Professional or Express. |
To enable a successful setup, complete the following steps in order :
Note: Windows version 8.1 is required if using a Mac. We recommend using BootCamp, however there are multiple ways to emulate a Windows environment (such as virtual machine window or VMWare Fusion) that haven’t been tested.
- Sign in to or create a Microsoft account.
- Install Visual Studio 2013 Update 4 (or later) Professional or Express.
- Plug in your Windows Phone to your workstation using a USB cable.
- Register your open/unlocked device for development at the Microsoft Dev Center.
- Obtain the latest StadiumVisionMobileSample-Windows Phone 8-xxxx.zip file.
Note: Contact your Cisco account team for details about how to become part of the Cisco StadiumVision Mobile SDK partner program.
Download and Unpack the SDK
To download and unpack the SDK, complete the following steps:
If you do not have this file, contact your Cisco account team for details about how to become part of the Cisco StadiumVision Mobile SDK partner program.
- Extract the downloaded package into a directory. Cisco StadiumVision Mobile SDK File Content lists the extracted content and includes a brief description.
Get Started with the Windows Demo App
The Cisco StadiumVision Mobile SDK provided to app developers includes the source code for a Windows Demo app. The purpose of the Demo app is to demonstrate what is possible and to enable a new app developer to quickly get a working app up and running. This section contains the following:
- Build the Demo App
- Customize the Demo App
- Debug the Demo App
- Embed the Cisco StadiumVision Mobile SDK into an Existing App
Note: Before creating a new app, review the Cisco StadiumVision Mobile SDK Best Practices at:
https://developer.cisco.com/site/svm/learn/best-practices/
Build the Demo App
To build the Demo app, complete the following steps:
- Launch Visual Studio to import the Demo app.
- Under File > Open > Project/Solution, locate and select CiscoSvmDemo.sln from the extracted folder contents, click Open .
You can also launch Visual Studio by double-clicking the CiscoSvmDemo.sln file.
- Select the applicable device from the center of the icon bar located near the top of the Visual Studio window. If the bar does not show the Device selection, change it to the ARM selection in the Build | Configuration Manager. The Device selection will then be visible.
Note: It is not possible to operate the Demo app using the Windows Phone emulator, however it is possible to operate the Demo app on a device because the emulator requires x86 support which is not currently available with the Cisco StadiumVision Mobile SDK.
Although you can manually select a different target, in order for the change to work you must make the change in the Build | Configuration Manager .
- A selection of ARM will change the target to the Device.
- A selection of Win32 will change the target to one of the emulator versions.
Even if you change the target drop-down from the center of the icon bar, Visual Studio will still build for the last platform selected in the Configuration Manager. In order to prevent compatibility issues, you must make the change in the Configuration Manager and not just the target drop-down.
The build output can be seen in the window at the bottom of the screen made visible by the View | Output menu bar selection.
Note: A device must be registered for development on a Microsoft account and be open (unlocked) in order to function.
Customize the Demo App
To customize the Demo app, complete the following steps:
- Create a copy of the CiscoSvmDemo folder.
- Open the copied CiscoSvmDemo.sln file from the CiscoSvmDemo folder.
- Right-click the View Designer link from the VideoPage.xaml entry (located under the SVM Demo project in Solutions Explorer) to open the XAML designer.
- Use the XAML Designer or Blend to make changes as appropriate for the name of the application, additional buttons, and so on. The SwapChainPanel element can contain sizing information and also can be placed in other elements, such as Grid.
Note: Results are not always predictable and some experimentation is required as the SwapChainPanel element does not give expected results if placed in certain elements such as ViewBox.
- After changes are made to the XAML file, build, and then run the changed file as described in Build the Demo App.
Debug the Demo App
To debug the Demo app, complete the following steps:
Debug the Demo app by making a local copy of the internal log file (logfile.txt) in the Videos folder on a Windows Phone that can be accessed by a computer. The internal log file provides messages and exceptions from the C# and Common C parts of the SVM SDK and the errors that occurred prior to a Demo app crash. The internal log file generator flushes the log file after each entry is added to provide information as to the last action performed.
- In the SVM Demo Settings menu, select Kill This App Now as shown in SVM Demo Settings to exit the application process.
The Demo app shuts down the log file, creates a copy, and places the copy in the Videos folder on the mobile device.
Note: Be sure to exit the Demo app before connecting the USB cable. If you do not exit the Demo app first, the log file will either not appear or be a previous version.
- Use your computer to navigate to the mobile device > Videos folder > logfile.txt .
- Open the log file using a text editing or word processing program such as Microsoft Word or Notepad.
You can also add similar code to an external app to obtain the same information.
Embed the Cisco StadiumVision Mobile SDK into an Existing App
The Cisco StadiumVision Mobile SDK can be embedded into an existing app. This section contains information and examples to assist you in embedding SVM capabilities into a custom application:
- Integration Checklist
- Channel ListBox Window Example
- Video Channel Selection Example
- Window Life-Cycle Notifications
- Configuration
- Wi-Fi AP Info Configuration
Integration Checklist
The following checklist is useful when you want to embed the Cisco StadiumVision Mobile SDK into an existing app:
Channel ListBox Window Example
The function "doInBackground" in the CiscoSvmDemo program "VideoPage.xaml.cs" illustrates the following actions:
Video Channel Selection Example
The following example plays the selected video channel in the ListBox:
private void VideoFilesList_SelectionChanged(object sender, SelectionChangedEventArgs e)
channels[((ListBox)sender).SelectedIndex];
Log.d(TAG, "Selected Video Channel = '" +
selectedChannel.bandwidthKbps +
// play the selected channel by launching the
String.Format("channel={0}&scaling={1}", selectedChannel.name, StadiumVisionMobile.objSVM.VideoScalingModeAspectFit);
Window Life-Cycle Notifications
The client app needs to notify the StadiumVision Mobile SDK of its life-cycle notifications. This allows the StadiumVision Mobile SDK to automatically shut down and restart as needed. Each client Window needs to forward its life-cycle notifications, as shown in the following example:
// notify the Cisco StadiumVision Mobile framework of the life-cycle event
StadiumVisionMobile.objSVM.onResume();
objBkgThread = ThreadPool.RunAsync(new WorkItemHandler(doInBackground));
// Loop until worker thread activates.
while (objBkgThread.Status != AsyncStatus.Started) ;
// terminate the channel update background thread
// notify the Cisco StadiumVision Mobile framework of the life-cycle event
StadiumVisionMobile.objSVM.onPause();
Configuration
There is one configuration file that must be bundled with any Windows app using the StadiumVision Mobile SDK (shown in Configuration File).
An example set of fields in the "cisco_svm.cfg" file is shown below. These fields must match the channel settings in the Cisco "Streaming Server" for the channels to be accessible by the application.
"contentOwner": "Multi-Tenant Team-B",
Wi-Fi AP Info Configuration
The "cisco_svm.cfg" config file can optionally include an array of Wi-Fi AP information that will be used by the StadiumVision Mobile SDK for statistics reporting if available. Below is an example Wi-Fi AP info entry in the "cisco_svm.cfg" config file:
Cisco StadiumVision Mobile Methods and Functions for Windows
This section provides detailed API return types, method names, and method descriptions:
Note: Detailed API information is also available in documentation Doxygen build that is downloaded with the SDK. Navigate to the S V Mobile for WP81 folder > StadiumVisionMobile > Doxygen > html . Double-click index.html to launch the documentation in a web browser.
Cisco StadiumVision Mobile Windows API Summary
Cisco StadiumVision Mobile Windows API Summary summarizes the Windows API library.
Return Status Object
Each API call returns an ‘SVMStatus’ object whenever applicable. SVMStatus Object lists the SVMStatus object fields.
getStats API Dictionary Keys and Stats Description lists the dictionary keys and stats description for the getStats API.
Video Player Window API Summary
The SVMVideoPlayerPage class can be extended and customized. Video Player Window API Summary lists the SVMVideoPlayerPage API methods and descriptions.
Add Cisco StadiumVision Mobile Services to a Windows App—Code Structure and Samples
This section describes the SDK workflow and contains the following sections:
- Start the SDK
- Cisco StadiumVision Mobile Service Up or Down Indicator
- In-Venue Detection
- Set the SDK Configuration at Run-Time
- Get the SDK Configuration
- setConfigWithString API Method
- Get the Available Streamer Servers
- Additional Statistics
- Video Player State Notifications
- Video Player "Channel Inactive" Event
Start the SDK
Start the StadiumVision Mobile SDK from the application’s main Windows launch Page, as shown in the following example.
static public StadiumVisionMobile objSVM = new StadiumVisionMobile(); // create exactly once
Cisco StadiumVision Mobile Service Up or Down Indicator
The Cisco StadiumVision Mobile SDK includes an indicator to the application indicating if the SVM service is up or down. This indication should be used by the application to indicate to the user whether the SVM service is available or not. Service is declared 'down' by the SDK when any of the following are true:
- The SDK detects that the video quality is poor.
- The SDK detects that no valid, licensed channels are available.
- The mobile device's Wi-Fi interface is disabled.
Poor video quality can occur when the user is receiving a weak Wi-Fi signal causing data loss. There are two different ways that the Windows app can get the "Service State" from the SDK:
- Register to receive the "Service Up/Down" notifications.
- Fetch the current service state from the SDK on-demand.
When the app receives the "Service Down" notification, the SDK will supply a bitmap containing the reasons why the service was declared as 'down' by the SDK. The 'reasons' bitmap is given in Service Down Notifications.
Note: For additional Service Down Notification details, refer to, review the Cisco StadiumVision Mobile SDK Best Practices on Cisco DevNet at:
https://developer.cisco.com/site/svm/learn/best-practices/
Receiving "Service Up/Down" Notifications
The following example shows how to register and handle the "Service Up/Down" notifications from the SDK:
objVpa = new SVMVideoPlayerPage(currentChannel);
// register to receive events from SVM
objVpa.onServiceUp += onServiceUp;
objVpa.onServiceDown += onServiceDown;
/// Called to notify of service up
Log.i(TAG, "CLIENT: SERVICE UP");
// Create a toast notification that the svm service is up
PopToast("SVM Service is UP");
/// Called to notify of service down
Log.i(TAG, "CLIENT: SERVICE DOWN");
// Create a toast notification that the svm service is down
PopToast("SVM Service is DOWN");
Get the Current "Service Up / Down" State On-Demand
The "getServiceState" API method can be used to fetch the current service state from the SDK. The following example shows how to fetch the current service state from the SDK using the "getServiceState" API call:
// get the current svm service state
SVMServiceStateEnum serviceState = objSVM.getServiceState();
// determine the current service state
if (serviceState == SVMServiceState.SVM_SERVICE_STATE_UP) {
Log.i(TAG, "### SERVICE STATE: UP");
} else if (serviceState == SVMServiceState.SVM_SERVICE_STATE_DOWN) {
Log.i(TAG, "### SERVICE STATE: DOWN");
In-Venue Detection
Beginning in Cisco StadiumVision Mobile Release 2.1, the SDK provides a mechanism to detect whether the mobile device is connected within the SVM-enabled venue or not.
There are two different ways that the Windows app can get this "In-Venue Detection" state from the SDK:
- Register to receive the "In-Venue Detection" notifications.
- Fetch the current "In-Venue" state from the SDK on-demand.
Receiving "In-Venue Detection" Notifications
The following example shows how to register and handle the "In Venue Up/Down" notifications from the SDK:
// register to receive events from SVM
objSVMChannelManager.venueEvent += onVenueChange;
/// Called to notify of venue change
private void onVenueChange (object sender, VenueEventArgs e)
if (e.venueState == StadiumVisionMobile.objSVM.SVM_VENUE_CONNECTED_EVENT_TAG)
Log.i(TAG, "CLIENT: VENUE CONNECTED");
Log.i(TAG, "CLIENT: VENUE DISCONNECTED");
Get the Current "In-Venue" State On-Demand
The "isConnectedToVenue" API method can be used to fetch the current in-venue state from the SDK. The following example shows how to fetch the current service state from the SDK using the "isConnectedToVenue" API call:
// get whether the device is currently connected to the SVM licensed venue
boolean isConnectedToVenue = StadiumVisionMobile.objSVM.isConnectedToVenue();
// log whether the device is currently connected to the SVM licensed venue Log.i(TAG, "### Connected to the venue: " + (isConnectedToVenue ? "YES" : "NO"));
Set the SDK Configuration at Run-Time
The application can set the SDK configuration at run-time through an API method. This allows the application to dynamically configure the SDK. For example, the application can fetch the SDK configuration information from a network connection and then pass that configuration to the SDK.
Two different ways to set the SDK configuration at run-time:
The signature of the "setConfig" API method is given below:
// configure the sdk using a JSON object containing the configuration settings
public static SVMStatus setConfig(JObject givenJsonConfig)
// configure the SDK using an nsdictionary containing the configuration settings
The signature of the "setConfigWithString" API method is given below:
// configure the sdk using a json-formated string containing the configuration settings
public static SVMStatus setConfigWithString(String jsonConfigStr)
The following example shows how to set the SDK configuration using the "setConfigWithString" API method:
// create the json config string
" \"venueName\": \"MyVenueNameKey\","
" \"contentOwner\": \"MyContentOwnerKey\","
Get the SDK Configuration
"getConfig" API Method
The signature of the "getConfig" API method is given below:
// get the current cisco sdk configuration
public static JObject getConfig()
The example below fetches the current configuration from the SDK, and then accesses the configuration values in the configuration JSON object:
// get the sdk configuration dictionary
JObject configObj = StadiumVisionMobile.getConfig();
// get the license dictionary from the config dictionary
licenseObj = configObj.getJObject("license");
// if the license object is valid
// get the current set of configured license keys
String venueName = licenseObj.getString("venueName");
String contentOwner = licenseObj.getString("contentOwner");
String appDeveloper = licenseObj.getString("appDeveloper");
Back to top of page
The following example shows how to set the SDK configuration using the "setConfig" API method:
// create the config json object with the set of licensing keys
JObject jsonConfig = new JObject();
licenseConfig.put("venueName", "MyVenueNameKey");
licenseConfig.put("contentOwner", "MyContentOwnerKey");
licenseConfig.put("appDeveloper", "MyAppDeveloperKey");
jsonConfig.put("license", licenseConfig);
Log.e(TAG, "Error building the json config object");
// update the cisco sdk configuration at run-time StadiumVisionMobile.setConfig(jsonConfig);
setConfigWithString API Method
The signature of the "setConfigWithString" API method is given below:
// configure the sdk using a json-formated string containing the configuration settings public static SVMStatus setConfigWithString(String jsonConfigStr)
The following example shows how to set the SDK configuration using the "setConfigWithString" API method:
// create the cisco sdk json configuration string
" \"venueName\": \"MyVenueNameKey\"," +
" \"contentOwner\": \"MyContentOwnerKey\"," +
" \"appDeveloper\": \"MyAppDeveloperKey\"" +
// update the cisco sdk configuration at run-time StadiumVisionMobile.setConfigWithString(config);
Get the Available Streamer Servers
The Windows SDK detects the available Streamer servers and provides an API to get the list of servers. A venue will typically only have a single Streamer server. The list is presented as an array of "SVMStreamer" objects.
// get the detected streamer servers as a .NET array of "SVMStreamer" objects
public static SVMStreamer[] getStreamerArray()
Each "SVMStreamer" object contains the following properties listed in SVMStreamer Object Properties.
Whether this StadiumVision Mobile Streamer server is allowed by the user of this SDK. |
||
The following example shows how to get the list of StadiumVision Mobile Streamer servers detected by the SDK:
// get the list of currently available streamer servers
SVMStreamerList streamerList = StadiumVisionMobile.objSVM.getStreamerList();
// iterate through the list of streamer objects
foreach (SVMStreamer nextStreamer in
// get the properties of the next streamer server object
String ipAddress = nextStreamer.getIpAddress();
String statsUploadUrl = nextStreamer.getStatsUploadUrl();
int statsSampleIntervalMs = nextStreamer.getStatsSampleIntervalMs();
int statsPublishIntervalMs = nextStreamer.getStatsPublishIntervalMs();
boolean isAllowed = nextStreamer.isAllowed();
Additional Statistics
Beginning in Cisco StadiumVision Mobile Release 2.0 SDK, the existing "stats" API call returns the following additional categories of stats information:
The signature of the existing "getStats" API method is given below:
// get the current set of cisco sdk stats as a dictionarymap
public Dictionary<String, String> getStats()
Note: For a detailed table of the hash keys and stats description for the getStats API refer to getStats API Dictionary Keys and Stats Description.
StatsManager Dictionary Keys details the StatsManager dictionary keys and descriptions.
Number of Reporter stat manager errors other than upload issues (for example, stat generation failures). |
|
Video Player State Notifications
The SDK generates event notifications for each of the video player state transitions (listed in Video Player State Notification. The application can listen to these notifications and take action based on the video player's state transitions.
Occurs when the video player closes the video channel session. |
|
Occurs when the video player starts playing the video channel. |
|
The following example shows how to subscribe to receive the video player event messages, and then parse the messages for the (1) channel name and (2) video player state:
public void registerChannelListChanged()
SVMChannelListener.objSVMChannelListener.channelChangeEvent
public void unregisterChannelListChanged()
SVMChannelListener.objSVMChannelListener.channelChangeEvent
private void onChannelStateChanged(object sender,
StadiumVisionMobile.ChannelChangeEventArgs e)
// e.channelName & e.channelState are two string arguments reported by
// Video Player State Notification is contained in string e.channelState
Video Player "Channel Inactive" Event
To detect that a currently playing video channel has become invalid (due to Streamer server admin changes), the SVM video player ("SVMVideoPlayerPage") provides an event to tell the video player sub-class (ie: "VideoPlayerPage") that the currently playing channel is no longer valid.
When a channel becomes invalid, playback of the video channel is automatically stopped.
To receive these callbacks, the "onCurrentChannelInvalid" method must be overridden by the 'SVMVideoPlayerPage' sub-class (ie: "MyVideoPlayerPage"). The following example shows the method signature and implementation of this event method:
objVpa = new SVMVideoPlayerPage(currentChannel);
// register to receive events from SVM
objVpa.onCurrentChannelInvalid += onCurrentChannelInvalid;
/// Called to notify of channel invalid (inactive)
private void onCurrentChannelInvalid()
Customizing the Default Video Player
This section describes customizing the video player. The default Cisco video player has the following features:
Cisco Demo Video Player
- Implemented as "VideoPlayerPage."
- Extends the "SVMVideoPlayerPage" class.
- Handles all video overlays and gestures.
- Uses standard Windows XAML layout files.
The video player’s XAML layout file defines:
- "SwapChainPanel" video rendering area.
- Transparent video overlays.
- Play/Pause/Rewind button graphic files.
- Animations used to show/hide the transport controller (splash screen).
The customized video play extends the "SVMVideoPlayerPage" base class, as shown below:
Video Channels
This section describes the Cisco StadiumVision Mobile SDK video channels and contains the following sections:
- Getting the Video Channel List
- Presenting the Video Channel List
- Playing a Video Channel
- Seeking Within the Video Buffer
- Setting the Video Dimensions
Getting the Video Channel List
The StadiumVision Mobile SDK dynamically receives all of the available channels (via Wi-Fi multicast). The client application gets an array of channel objects (SVMChannel[]) through the "getVideoChannelArray" API call, as shown in the following example:
// get the list of available video channels
SVMChannel[] channels = StadiumVisionMobile.getVideoChannelArray();
// display some channel information
Log.d(TAG, "Channel Name = " + channels[0].name);
Log.d(TAG, "Channel Bandwidth = " + channels[0].bandwidthKbps);
Log.d(TAG, "Channel Body Text = " + channels[0].bodyText);
Presenting the Video Channel List
Each "SVMChannel" video channel object contains all of the information needed to display the channel list to the user. The SVMChannelObject properties and descriptions are shown in SVMChannel Object Properties.
Playing a Video Channel
The following example shows playing a video channel, and performs the following actions:
Seeking Within the Video Buffer
The last 30 seconds of played video is stored in device RAM. The following example shows jumping backwards 20 seconds in the video buffer (instant replay):
// rewind video playback 20 seconds
The following example shows jumping back to the top of the video buffer ("live" video playback):
// seek to the top of the video buffer (0 ms offset)
Setting the Video Dimensions
The video region is rendered within a SwapChainPanel. The video region is configured using standard Windows layout XAML techniques.
Data Channels
This section describes the Cisco StadiumVision Mobile SDK data channels and contains the following sections:
Getting the Data Channel List
The StadiumVision Mobile SDK dynamically receives all of the available data channels (via Wi-Fi multicast). The client application gets an array of channel objects (SVMChannel[]) through the "getDataChannelArray" API call, as shown in the following example:
// get the list of available data channels
SVMChannel[] channels = StadiumVisionMobile.objSVM.getDataChannelArray();
// display some channel information
Log.d(TAG, "Channel Name = " + channels[0].name);
Log.d(TAG, "Channel Bandwidth = " + channels[0].bandwidthKbps);
Log.d(TAG, "Channel Body Text = " + channels[0].bodyText);
Observing a Data Channel
Any data channel can be observed by registering an event to receive callbacks for all data received on that channel. The registered event needs to implement the "ISVMDataObserver" interface, as shown in the following example:
// register to receive data from the given data channel
StadiumVisionMobile.objSVM.nativeAPI.dataAvailableEvent += onDataHandler;
The "onData" method is called to push the received data to the registered class, as shown in the following example:
* This method is the implementation of the ISVMDataObserver interface.
* The latest received data for the given 'channelName' is forwarded to
* this method from a Windows event class, so that this method can
private void onDataHandler(object sender, NativePlayer.DataAvailableEventArgs e)
onData(e.channelName, e.dataBytes);
public async void onData(String channelName, byte[] data)
// publish the incremental update in UI thread
CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
// log the received data parameters
Log.d(TAG, "DATA CALLBACK: channelName = " + channelName + ", data length = " + data.Length);
Integrate EVS C-Cast
Note: Cisco StadiumVision Mobile is supported with EVS C-Cast version 2.x only. EVS C-Cast version 3.x is not supported.
Although the Demo app does not support C-Cast, the steps below describe a high level workflow of how a Cisco StadiumVision Mobile powered C-Cast app gains access to the XML timeline and media files. Variations are possible, for instance the file list can be polled every few seconds via StadiumVisionMobile.objSVM.getFileChannelArray instead of getting an event as described in Step 2 below.
- Register an event to be notified when a C-Cast file channel
becomes available. For example:
StadiumVisionMobile.objSVM.nativeAPI.fileAvailableEvent += onFileHandler; - Register an event to be notified when the media data file becomes available. For example: StadiumVisionMobile.objSVM.nativeAPI.dataAvailableEvent += onDataHandler;
- Handle the file reception (movies/thumbnails/timeline).
- Check to see if a file channel is already available using StadiumVisionMobile.objSVM.getFileChannelArray
- If a channel is already available or when a callback notification is received, register a file channel event handler.
- Wait for the timeline to arrive via multicast on the data channel. At the same time, other files may arrive on the file channel.
- Once the timeline data has been received, parse it using the steps in chapter 5 (How to build the media path) of the C-Cast API spec, and then build the media path for all media files. Contact James Stellphlug (j.stellpflug@evs.com) to obtain the C-Cast API documentation.
- For each file media path, remove the path prefix so that
only the filename remains. For example:
http://www.mydomain.com/videos/abc/def/ghi/abcdefghijklmnopqrstuvwxyz123456_hls-ipad.m3u8
becomes
abcdefghijklmnopqrstuvwxyz123456_hls-ipad.m3u8 - For each filename, cycle through until all files have been received.
- Be prepared for the ccast-timeline.xml file to change at any time and repeat steps 6-8 whenever it changes.