In-App Youtube Player
Description
Â
Â
Description
Added support of in-app YouTube player.
<img src="https://user-images.githubusercontent.com/32511718/42520530-e28cf836-847f-11e8-9dfb-864084ed6b70.png" width="300"> <img src="https://user-images.githubusercontent.com/32511718/42520570-ffcc5c0c-847f-11e8-8a89-2892118227cb.png" width="300">
<img src="https://user-images.githubusercontent.com/32511718/42520487-cc5e544c-847f-11e8-9915-c39bb464f20d.png" width="200">
Â
Â
Feature flag
This feature is behind a flag namely "INAPP_YOUTUBE_PLAYER". Sample flag model is as below:
```
INAPP_YOUTUBE_PLAYER:
ENABLED: true
YOUTUBE_PLAYER_KEY: 'XYZXYZ'
```
Â
Â
Notes
Altered video playing order in CourseUnitPagerAdapter. Previously the adapter checked and rendered the related fragments for units in following order:
1. CourseUnitVideo
2. CourseUnitOnlyOnYoutube
3. CourseUnitDiscussion
4. CourseUnitMobileNotSupported
5. CourseUnitEmpty
6. CourseUnitWebView
7. CourseUnitMobileNotSupported
I have changed the above order to the following:
1. CourseUnitOnlyOnYoutubeNotSupported
2. CourseUnitOnlyOnYoutube
3. CourseUnitVideo
4. CourseUnitDiscussion
5. CourseUnitMobileNotSupported
6. CourseUnitEmpty
7. CourseUnitWebView
8. CourseUnitMobileNotSupported
The feature flag will be checked first to see if we can play YouTube video within app. If not, then the `CourseUnitOnlyOnYoutubeNotSupported` fragment will be loaded where user will be asked to view the video in the browser or YouTube app. Then if the video is already downloaded, it will be played as `CourseUnitVideo` rather than as YouTube video.
Â
Â
Docs
[Overview](https://developers.google.com/youtube/android/player/)
[YouTubePlayerSupportFragment](https://developers.google.com/youtube/android/player/reference/com/google/android/youtube/player/YouTubePlayerSupportFragment)
[Sample](https://developers.google.com/youtube/android/player/sample-applications)
Â
Â
Testing
[ ] i18n
[ ] RTL
[ ] Performance
Assignee
Reporter
Contributor Name
Repo
Customer
Epic Link
OSCM Assignee
Platform Map Area (Levels 1 & 2)
Platform Map Area (Levels 3 & 4)
Blended Hour Utilization Percentage
edX Theme
edX Squad
Github Lines Added
Github Lines Deleted
Priority
