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

FEM 2175 - Add Captions styling to ExoPlayerWrapper #477

Merged
merged 26 commits into from
Nov 15, 2018
Merged

FEM 2175 - Add Captions styling to ExoPlayerWrapper #477

merged 26 commits into from
Nov 15, 2018

Conversation

GouravSna
Copy link
Contributor

@GouravSna GouravSna commented Oct 26, 2018

Create SubtitlesStyle using,

SubtitleStyleSettings subtitleStyleSettings = new SubtitleStyleSettings("NormalStyle")
                    .setSubtitleBackgroundColor(Color.BLUE)
                    .setSubtitleTextColor(Color.WHITE)
 .setSubtitleTextSizeFraction(SubtitleStyleSettings.SubtitleTextSizeFraction.SUBTITLE_FRACTION_50)
                    .setSubtitleWindowColor(Color.YELLOW)
                    .setSubtitleEdgeColor(Color.BLUE)
                    .setSubtitleTypeface(SubtitleStyleSettings.SubtitleStyleTypeface.MONOSPACE)
     .setSubtitleEdgeType(SubtitleStyleSettings.SubtitleStyleEdgeType.EDGE_TYPE_DROP_SHADOW);

Attributes are:

  • Background Color
  • Text color
  • Text Size
  • Window Color
  • Edge Color
  • Font family
  • Edge type

Then set the subtitleStyleSettings in PlayerSettings,

player.getSettings().setSubtitleStyle(subtitleStyleSettings);

To update the subtitles create another object using the above method and then call updateSubtitleStyle(..) on player object ,

player.updateSubtitleStyle(subtitleStyleSettings);

@GouravSna GouravSna changed the title Fem 2175 FEM 2175 - Add Captions styling to ExoPlayerWrapper Oct 26, 2018
- Local variable for subtitleView in ExoPlayerWrapper
Copy link
Contributor

@noamtamim noamtamim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except the the minor comment, looks good now. But don't merge yet.

Copy link
Contributor

@OrenMe OrenMe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • add parsable so application(or Kaltura player) can save user settings and apply them on each player instantiation.
  • Shorten builder set/get names and omit subtitles, e,g. setSubtitleBackgroundColor ==> setBackgroundColor

@GouravSna GouravSna merged commit 8b06384 into dev Nov 15, 2018
@OrenMe OrenMe deleted the FEM-2175 branch November 15, 2018 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants