5 November 2010
ページ ツール |
Working knowledge of ActionScript 3 and Flash Builder or Flash Professional is recommended for this tutorial.
中級
In this article you will create a basic MediaFactory-driven Open Source Media Framework (OSMF) 1.5 player and use the updated F4M file format specification to play back a live multicast P2P stream with the help of the Adobe Flash Media Live Encoder, Adobe Flash Media Server 4, and the Multicast Configuration tool that comes with it. When used together, these tools provide a powerful, easy-to-implement solution for delivering video with enhanced reach and capabilities.
The new Multicast Configuration tool makes it easy to create an OSMF-ready F4M manifest file to use with any RTMP based video publishing tool, including the free Flash Media Live Encoder, and to work with the new RTMFP multicast application that ships with Adobe Flash Media Server.
Note: The version of this tool that ships with Flash Media Server 4 is outdated and will not work with the OSMF implementation of multicast. The Multicast Configuration tool included in the sample file for this article is the latest version and should be used in place of the one that ships with Flash Media Server 4.
This article covers the following topics:
You can use Adobe Flash Builder 4 or Adobe Flash Professional CS5 to complete the steps in this article. After downloading the sample files for this article, follow the steps below to get started.
If you're using Flash Builder:
If you're using Flash Professional:
Follow these steps to create the manifest file:
Note: The version of this tool that ships with Flash Media Server 4 is outdated and will not work with the OSMF implementation of multicast. The Multicast Configuration tool included in the sample file for this article is the latest version and should be used in place of the one that ships with Flash Media Server 4.
Now that you have a manifest file and the stream name, follow these steps to run the sample application:

initPlayer() method, change the parameter that is passed to the URLResource() constructor from DYNAMIC_STREAMING to MULTICAST_F4M://the pointer to the media - change it to MULTICAST_F4M and review the F4M var resource:URLResource = new URLResource( MULTICAST_F4M );
For more information on multicast and OSMF, see the Open Source Media Framework Developer's Guide (PDF, 1 MB) or visit the Open Source Media Framework website. You may also want to explore the sample projects and templates in the Video Technology Center and the Flash Media Server Developer Center.
To learn how to make a multicast video player without using the MediaFactory class and an F4M manifest file, read the companion article, Creating a simple multicast video player using OSMF.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License