Skip to content

4. Not explicitly stopping broadcast video before playing broadband #8

@hiren3897

Description

@hiren3897

How to explicitly kill or stop the broadcast before starting the application

	try{
		var broadcast = $("#broadcast")[0];
		if( !broadcast ){
			$("body").append("<object type='video/broadcast' id='broadcast'></object>");
		}
		broadcast = $("#broadcast")[0];
		console.log( "Current broadcast.playState="+ broadcast.playState );
		if( broadcast.playState != 3 ) { // 0=unrealized, 1=connecting, 2=presenting, 3=stopped
			broadcast.stop();
			console.log("broadcast stopped");
                        appObject.show();
		}
	} catch(e){
		console.log("error stopping broadcast");
	}

Am I doing it the right way?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions