Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HLS on Tizen #18

Open
pedrosilvabos opened this issue Aug 19, 2021 · 1 comment
Open

HLS on Tizen #18

pedrosilvabos opened this issue Aug 19, 2021 · 1 comment

Comments

@pedrosilvabos
Copy link

pedrosilvabos commented Aug 19, 2021

@l1bbcsg @reeFridge @nomean42
Hello, trying to play HLS on tyzen

video.prepare(url, {
    [PrepareOption.TYPE]: MediaType.HLS
});
video.once(video.EVENT_READY, () => video.play());

this will work in HTML and Webos but not on Tyzen.

Could you please send me a working hls on tyzen sample ?
Thank you

@criskurtin
Copy link

criskurtin commented Jan 13, 2022

I have this in my Player scene:

src/scenes/player.js

// ...

	play(url, options) {
		this._video.prepare(url, options);
	}

// ...

	_initVideo() {
		this._video = app.device.createStatefulVideo();

		// chrome "fix" - it won't autoplay anything anymore if it ain't muted...
        	if (app.isDevicePc()) {
          	        this._video.setMuted(true);
     	        }
        
		this._video.once(this._video.EVENT_READY, () => this._video.play());
                this._video.on(this._video.EVENT_ERROR, () => this._onError());
        }

// ...

and this in the main application.js:
src/application.js

// ...

        /**
         * Plays the provided HLS m3u8 playlist
         */
	loadPlayerScene(streamUrl) {
		const player = this.getLayerManager().getLayer('player');

		return this.getSceneOpener().open(player, () => {
			player.play(streamUrl, {
				[PrepareOption.TYPE]: MediaType.HLS
			});
		});
	}

// ...

and it works perfectly fine. Using the latest official zombiebox and zombiebox-platform-tizen packages. I also had some issues initially but that turned out to be related to the SDK/emulator version. The latest version of TV emulator wouldn't load the application/stream correctly. Maybe it's the same issue as with LG webOS v5/v6 emulators which don't support HLS playback due to some limitations (even though the devices themselves play it normally). Check this response for more info...

All this is, of course, only helpful if you are trying to test it via emulatos. If it's about the real device, then it won't help much. The only thing that comes across my mind is if your device DUID is not linked to the distributor certificate or if you need to open Device Manager and right click the device > permit to install applications.

P.S. maybe this issue should be moved to zombiebox-platform-tizen issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants