Coder Social home page Coder Social logo

Comments (7)

geoffreytan avatar geoffreytan commented on August 11, 2024

Hi

Unfortunately the ui-theme parameter is deprecated parameter on the Dailymotion JS player. Therefore the use of the ui-theme parameter inside the Android Player will have not result.

However, you may try to use the ui-highlight parameter to customize some ui aspect of the player.
More info can be found here: https://developer.dailymotion.com/player/#player-parameters

Additionally, you can customise the player UI in the Dailymotion Partner HQ for your uploaded content.

Cheers,

from dailymotion-player-sdk-android.

ghosalmartin avatar ghosalmartin commented on August 11, 2024

Hello

I am loading it via

playerWebView.load(model.videoEntryId, mapOf("ui-highlight" to "008000"))

An example I've seen is https://www.dailymotion.com/embed/video/x3rdtfy?ui-highlight=FFFFFF

But digging into the code only defaultQueryParameters are added to the URL here:

https://github.com/dailymotion/dailymotion-player-sdk-android/blob/master/sdk/src/main/java/com/dailymotion/android/player/sdk/PlayerWebView.kt#L143

Are the extra params actually added? I've followed the code they take but can't seem to get a clear answer?

from dailymotion-player-sdk-android.

geoffreytan avatar geoffreytan commented on August 11, 2024

Hi,

defaultQueryParameters are the parameters used to initialize the player directly with an url.
Those are currently not overridable except for queue-enable property.

The extra params are only used and forwarded for the load method documented here:
https://developer.dailymotion.com/player/#player-api-methods-load

In your case, the ui-highlight parameter need to be passed on the player url initialization and so the use of of the method load is not appropriate.

I would recommend to use the method initialize with which you can build url and parameter as wanted. That would make something like that:

val defaultQueryParameters: MutableMap<String?, String?> = HashMap()
defaultQueryParameters["sharing-enable"] = "false"
defaultQueryParameters["watchlater-enable"] = "false"
defaultQueryParameters["like-enable"] = "false"
defaultQueryParameters["collections-enable"] = "false"
defaultQueryParameters["fullscreen-action"] = "trigger_event"
defaultQueryParameters["locale"] = Locale.getDefault().language
defaultQueryParameters["queue-enable"] = "false"
defaultQueryParameters["ui-highlight"] = "008000"

playerWebView.initialize("https://www.dailymotion.com/embed/", defaultQueryParameters, HashMap())
playerWebView.load(mapOf("videoId" to "INSERT_VIDEO_ID"))

Cheers,

from dailymotion-player-sdk-android.

ghosalmartin avatar ghosalmartin commented on August 11, 2024

I'll give that a shot thanks :)

from dailymotion-player-sdk-android.

ghosalmartin avatar ghosalmartin commented on August 11, 2024

i tried

        defaultQueryParameters["sharing-enable"] = "false"
        defaultQueryParameters["watchlater-enable"] = "false"
        defaultQueryParameters["like-enable"] = "false"
        defaultQueryParameters["collections-enable"] = "false"
        defaultQueryParameters["fullscreen-action"] = "trigger_event"
        defaultQueryParameters["locale"] = Locale.getDefault().language
        defaultQueryParameters["queue-enable"] = "false"
        defaultQueryParameters["ui-highlight"] = "00FF00"

        playerWebView.initialize("https://www.dailymotion.com/embed/", defaultQueryParameters, HashMap())
        playerWebView.load(model.videoEntryId)

with no luck really. still displays as red instead of lime green

from dailymotion-player-sdk-android.

geoffreytan avatar geoffreytan commented on August 11, 2024

Hi there 👋

If you managed to change the player seekbar to red that means the ui-highlight params is working as intended.

After further discussion with the Player JS Team, looks like it is not possible to dynamically change the ui-highlight on the go.
So I guess that means you will need to discard the previous PlayerWebView and create a new one which will then use the newly desired value for ui-highlight.

from dailymotion-player-sdk-android.

geoffreytan avatar geoffreytan commented on August 11, 2024

Closing issue due to inactivity

from dailymotion-player-sdk-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.