bertrandmartel / youtubetv Goto Github PK
View Code? Open in Web Editor NEW:tv: YouTube embedded player library for Android TV
License: MIT License
:tv: YouTube embedded player library for Android TV
License: MIT License
Hi. Thank you very much for building this library.
I got a question tho, is there any where I can play live YouTube video using this library of yours?
Or anyone that already extended the library that willing to share.
Thank you.
I am getting this error while including just the dependency
androidtv/tv/build/intermediates/res/merged/debug/values/values.xml:546: AAPT: Attribute "borderWidth" already defined with incompatible format.
androidtv/tv/build/intermediates/res/merged/debug/values/values.xml:436: AAPT: Original attribute defined here.
androidtv/tv/build/intermediates/res/merged/debug/values/values.xml:546: error: Attribute "borderWidth" already defined with incompatible format.
androidtv/tv/build/intermediates/res/merged/debug/values/values.xml:436: Original attribute defined here.
Hi,
I tried many control to make webview clickable false. But this is not working.
mWebView.setOnTouchListener(new View.OnTouchListener() {
@OverRide
public boolean onTouch(View v, MotionEvent event) {
return false;
}
});
mWebView.setClickable(false);
mWebView.setEnabled(false);
mWebView.setFocusableInTouchMode(false);
mWebView.setFocusable(false);
Also i tried to make the whole view clickable false
View view =inflate(getContext(), R.layout.youtube_view, this);
view.setClickable(false);
view.setEnabled(false);
view.setFocusableInTouchMode(false);
view.setFocusable(false);
view.setOnTouchListener(new View.OnTouchListener() {
@OverRide
public boolean onTouch(View v, MotionEvent event) {
return true;
}
});
I do not want to play pause video when user click on video. But it automatically pause the video .
Please help me
Can u please upgrade for migrate to AndroidX?
how to set video id programmatically in activity?
If I need to covert this library to android X then How can I do it?
The playback controller comes up in the middle of the screen.
Hi. Are you still maintaining this? It has stopped working for us on Android TV. The backdrop thumb loads but then it just sits there with the spinner. The "PlayerReady" event fires but player status never changes and it never starts playing.
Only error is:
I/chromium: [INFO:CONSOLE(751)] "Unrecognized feature: 'picture-in-picture'.", source: https://www.youtube.com/s/player/02486e7d/www-widgetapi.vflset/www-widgetapi.js (751)
Hi,
We are getting a green line over video while playing 4k video on TV, This is appearing on some TV only.
https://stackoverflow.com/questions/49316516/webview-iframe-shows-green-line-on-top
Please help to fix this issue.
Thanks,
Neha
Any plans to upgrade this useful lib?
Needs to be compatible with the new androidx Leanback lib.
I did some experiments to make a migration, but I'm not able to play any youtube videos.
Hi, do you plan on exposing an interface for error handling? Now there is no way to know if the embedded video has been deleted.
So I got a video, in debug mode it says it is loaded but there is endless buffering to the point that the video wont move one second. Weird thing is that the captions automatically load. Ive tried changing quality to tiny but it doesnt change it accordiding to the debug vieew.
Since the policy changes...
https://developers.google.com/web/updates/2017/09/autoplay-policy-changes
autoplay doesn't work...
I'm having a probem when using this library.
When I exit the activity, I'm calling the following:
fragment.closePlayer(); // does nothing
This one always return null for the view.
YoutubeTvView view = (YoutubeTvView) findViewById(fr.bmartel.youtubetv.R.id.youtubetv_view);
if (view != null) {
view.stopVideo();
view.closePlayer();
}
This is the activity I'm using:
public class YoutubePlaybackActivity extends Activity {
private static final String TAG = YoutubePlaybackActivity.class.getSimpleName();
public static final String EXTRA_VIDEO_ID = "videoId";
public static final String EXTRA_CONTENT_LIST = "ContentList";
private YouTubePlayerView mYouTubePlayerView;
private static final String API_KEY = "AIzaSyBgDhyTYKAIfDlHODy-r6BopuhTTNp7nro";
private YoutubeTvFragment mFragment;
public void toggleHideyBar() {
// The UI options currently enabled are represented by a bitfield.
// getSystemUiVisibility() gives us that bitfield.
int uiOptions = getWindow().getDecorView().getSystemUiVisibility();
int newUiOptions = uiOptions;
boolean isImmersiveModeEnabled =
((uiOptions | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY) == uiOptions);
if (isImmersiveModeEnabled) {
Log.i(TAG, "Turning immersive mode mode off. ");
} else {
Log.i(TAG, "Turning immersive mode mode on.");
}
newUiOptions ^= View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
newUiOptions ^= View.SYSTEM_UI_FLAG_FULLSCREEN;
newUiOptions ^= View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
getWindow().getDecorView().setSystemUiVisibility(newUiOptions);
}
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_youtube_playback);
toggleHideyBar();
Bundle args = new Bundle();
args.putString("videoId", getIntent().getStringExtra(EXTRA_VIDEO_ID));
args.putString("videoQuality", "hd1080");
mFragment = YoutubeTvFragment.newInstance(args);
FragmentTransaction transaction = getFragmentManager().beginTransaction();
transaction.add(R.id.root, mFragment);
transaction.commit();
}
@Override
protected void onDestroy() {
if (mFragment != null) {
mFragment.closePlayer();
}
YoutubeTvView view = (YoutubeTvView) findViewById(fr.bmartel.youtubetv.R.id.youtubetv_view);
if (view != null) {
view.stopVideo();
view.closePlayer();
}
super.onDestroy();
}
}
is there something I'm forgetting about?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.