In-App Youtube Player

Description

  1.  

    1.  

      1. 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">

  1.  

    1.  

      1. 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'
```

  1.  

    1.  

      1. 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.

  1.  

    1.  

      1. Docs

  1.  

    1.  

      1. Testing

  • [ ] i18n

  • [ ] RTL

  • [ ] Performance

Status

Assignee

Unassigned

Reporter

Open Source Pull Request Bot

Contributor Name

M Zohaib Asaad

Repo

edx/edx-app-android

Customer

None

Epic Link

None

OSCM Assignee

None

Platform Map Area (Levels 1 &amp; 2)

Learner Experiences - Course Experience

Platform Map Area (Levels 3 &amp; 4)

None

Priority

Unset
Configure