MACROMEDIA FLASH COMMUNICATION SERVER MX-SERVER-SIDE COMMUNICATION ACTIONSCRIPT DICTIONARY Spezifikationen Seite 133

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 369
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 132
Application Development Tips and Tricks 55
Note: If you are using speakers instead of a headset, you may want to comment out the call to Microphone.get() to
avoid audio feedback. For more information, see “Avoiding audio feedback” on page 83.
#include "NetDebug.as"
stop();
// Initialize movie by getting a camera and microphone, and
// Configure the initial camera and microphone settings
client_cam = Camera.get();
client_cam.setMode(150,120,5);
client_cam.setQuality(0, 90);
client_mic = Microphone.get();
client_mic.setRate(22);
// Get the stream to publish and play
function getPlayStream() {
// Get new net connection
client_nc = new NetConnection();
// Handle status message
client_nc.onStatus = function(info) {
trace("Level: " + info.level + newline + "Code: " + info.code);
}
client_nc.connect("rtmp:/doc_bandwidth/room_01");
// Create a stream to which to publish
out_ns = new NetStream(client_nc);
out_ns.attachVideo(client_cam);
out_ns.attachAudio(client_mic);
out_ns.publish("myAV");
// Create a stream to receive the published data
in_ns = new NetStream(client_nc);
Output_mc.fromSrvr.attachVideo(in_ns);
Output_mc.fromSrvr.attachAudio(in_ns);
in_ns.play("myAV");
}
// Called from the bandwidth buttons
function updateBandwidth(b) {
// Respond to a change in the bandwidth
// If "Modem" was selected
if ( b == 1 ) {
client_cam.setMode(160,120,2);
client_cam.setQuality(0, 75);
client_cam.setKeyFrameInterval(3);
client_mic.setRate(5);
// For demonstration purposes, change size of screen
Output_mc._height = 100;
Output_mc._width = 150;
// If "DSL" was selected
} else if ( b == 2 ) {
client_cam.setMode(160,120,5);
client_cam.setQuality(0, 85);
Seitenansicht 132
1 2 ... 128 129 130 131 132 133 134 135 136 137 138 ... 368 369

Kommentare zu diesen Handbüchern

Keine Kommentare