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

feat(android): expose videoPlayer buffer #13727

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

m1ga
Copy link
Contributor

@m1ga m1ga commented Jan 22, 2023

Expose the Android VideoPlayer buffer event

var win = Ti.UI.createWindow();
var v = Ti.Media.createVideoPlayer({
	width: 300,
	height: 300,
	url: "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerEscapes.mp4"
});
var lbl = Ti.UI.createLabel({top: 0});

v.addEventListener("buffer", function(e){
	lbl.text = e.percentage
})

win.add([v,lbl]);
win.open();

label at the top should fill up to 100

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

Successfully merging this pull request may close these issues.

1 participant