I'd like to implement bookmarks app allowing to save a bookmark for a particular moment in a youtube video so that it would be possible to jump back to the given second of the video.
I'd like it to be seamlessly integrated with the native youtube app. Is it possible to create a transparent layer on top of youtube app so that I could add this kind of functionality? I mean kind of button in the corner of the screen allowing to save the exact moment of the video. To do that I need to know what youtube video is being watched and what is the moment? Is it doable?
I have no experience with android development, but I'm a skilled Java programmer.
This is a link to a youtube video which takes you directly to a certain moment in the video: https://theyoutubevideolink?t=36m42s (Note everything after ?)
This also works on the current Android YouTube App you can click on the link and it will directly take you to the moment. So it is possible to simply save that link to an external overlay/database.
But before thinking about that you understand Root permission is needed to be able to do this as an overlay. If you are fine with this, it is doable there are many open source YouTube apps with changes made to them on XDA Developers for example, and a simple database addition can the trick for this.
[EDIT]
Well I just went on the YouTube app and you cant hold a time-link like for example on LinusTechTips new video on mobile if you scroll down to the comments you will see many comment showing 0:55 which if you click on can take you directly to that moment in the video. Because we cant hold or anything else than just click, You will need to re-write so you can highlight etc.. which is why i mentioned before about having root access since you cant install third party YouTube apps it has to be re-written and just made into another app. To start you off check this re-written YouTube app called SkyTube: https://github.com/ram-on/SkyTube
Related
We want to play some YouTube videos in my React Native app without YouTube branding. We would like to give the user experience as if the video is playing in a native player. We already tried with webview, react-native-youtube-iframe but still, we are not able to achieve our goal. Either top or bottom section has a YouTube logo, then watch and share options are visible. We want to eliminate those. Any possible way to do this in React Native?
URLs of Youtube videos are different for normal videos and embedded videos.
Normal: https://www.youtube.com/watch?v=DGQwd1_dpuc
Embed: https://www.youtube.com/embed/DGQwd1_dpuc
Please change 'watch?v=' with '/embed/'.
You can also hide controls and information by passing 'showinfo=0' or 'controls=0'.
I recently tried to achieve the similar thing in one of my android app if you can somehow use this particular library
This is an android library and as you mentioned you want to do it in android.
android-youtube-player
I have used this library where i used a player with custom control which helps you override the controls and also this share and next button and even the youtube logo.
Let me know if you need any help further.
Edit:
To enable web UI
IFramePlayerOptions options = new IFramePlayerOptions.Builder().controls(1).build();
Then initialize the player with this controls.
You won't see any logo now.
Background
Some teams in my company's facilities are using Android tablets for multiple operations. We would like to allow them to access video demos from their tablets, when they are at specific places in the facility, without having to search through the tablet for the right video. So we thought of QR codes (printed on paper, stuck to the wall). Problem is: for security reasons, we can't allow the devices to access any network.
Question
So the idea is to store the videos locally, and have the QR code route to the local file. I thought this would be easy but it doesn't appear to be.
I have generated QR codes like file:///path/to/my/file.mp4, also trying to play with intents, like this:
file:///path/to/my/file.mp4#Intent;scheme=file;action=android.intent.action.VIEW;type=video/mp4;end.
(+ variants including intent://, using scheme=file, targeting images instead of videos...)
In the best cases, the browser opens, closes, and I receive "Cannot display file. Invalid PDF", and in the worst cases, "Sorry, the application could not be launched. The bar code content may be invalid.".
I also tried variants (images instead of videos, URL vs plain text QR codes, several code scanner applications), all with the same result. I have searched through SO, but most questions are about doing this programmatically in an application, while I would like to avoid designing an app just for this.
What am I doing wrong? Is there no way to do this that way?
Note: I had absolutely no knowledge about Android and intents before trying to solve this case, there may be smarter workarounds. Any hint is appreciated.
Given the network requirement within your company, it seems building a simple application is the easiest solution(maybe because I am an app developer).
So your app would need only 2 screens. QR code Scanner and a View that shows the video.(once you click done, go back to scanning)
The app can have all the videos you need prebuilt in the app itself and the QR codes can be the names of those videos.
Okay, I don't know if you are using web page or any android app for this fature, for web page you need to create your own scanner or integrate ready made solution i found 1 here, you will need setTimeinterval so it scans bar code once, Once barcode is found you will need to call your ajax method to fetch complete URL of that video, once any item is returned, you need to display it in iframe.
Hope it works for you.
I want to know if there is an easy way for someone with almost inexistent coding skills to create this simple app. The only thing this app will do is act like a browser for a specific site and it will allow playback EVEN when the screen is off or the user has pressed the home button. So if a youtube video starts playing, it will be keep playing in the background if for example the user goes to another app.
Thank you very much for you app!
I think the easier and the most user-friendly way to do this is by using a front-end framework like Bootstrap...
How to achieve from an android application which can subscribe, like or dislike a particular youtube video from android application side. And yes this is not so far, i also want callback for all of them like once user has like video then i want callback of that, too. I have searched and got some idea about YouTube Data API,but how to integrate it in my own app that is what i am confused. And is there any else way to achieve this, if someone have then kindly let me know.
To get ratings (like or dislike) you have to to take the video_ID and make a separate API request to get the details you want for the video.
Here are some of the Listener, you may use this specially for loading, playing and controlling video callback: https://developers.google.com/youtube/android/player/reference/com/google/android/youtube/player/YouTubePlayer#Overview
You may use the 'Get Started', The document will help you to set up your development environment and use the Youtube Android Player API.
I want to play video in my application, but now am confused in different approach to play video in android. Android itself has a feature "VideoView". Shall I implement this videoView or use an Intent.action_view to open the video in the existing player.
I want to know the best approach to follow and the pros and cons of videoView ?
Please guide me!!
Well the best practice, generally, is to use Intent system as much as you can to avoid additional overhead required to implement them yourself when there could, possibly, be better alternatives and to provide users with additional choice. But there might be cases when there is no application available for the required action and hence you'll be needing to implement the task yourself.
My advice is use the intent system, and if no apps were found in user's handset for video playback then you can use VideoView in that case.
No one can tell with out your purpose
1) Based on your requirement you have to choose which one is suitable
2) If you want's to open current video in your own application , you have to use Video view and to Implement controls for Video view , you should use MediaController class
actually this is like createing small video view with minimal options .
3) instead of creating Custom video view you can play selected video using Action.View , but that some of Video player should have in your device .here your opeing in your video in other application , depends on that application you can show more options for video accessing .
Well, there is no right or wrong way here.
It really depends on what you want to do. If the user of your app should only be able to watch the video and your app doesn't need to interact in any way during the playback or needs any information about whether or how the user watched the video, then an intent would probably suffice. And it's less work.
If you want to provide any additional features during the playback a VideoView would be better (and it's really not that much work to implement a simple videoview). Also with an intent you don't know what app the user will choose to open the video, so you have no guarantee how the user will experience your video...
If you implement your own video view you have full control, how it works and how it looks.
So if it's not the core functionality and you only want to show a video once or so, an intent is probably a good way. If it's an important part of your app and you might want to add features and if it would be a bad experience for the user if s/he chose a bad video player, I would definitely recommend doing the little extra work and impl your own video viewer activity...