Sign in

Integrate fluidplayer

  • This topic has 1 reply, 2 voices, and was last updated 3 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #5145
    coderuna

    What is the right way to add Fluid Player on Publii

    I used default config and paste this code to: Custom HTML > Before every post

    <script src="https://cdn.fluidplayer.com/v3/current/fluidplayer.min.js"></script>
    <script>
    var myFP = fluidPlayer(
    'video-id',	{
    "layoutControls": {
    "controlBar": {
    "autoHideTimeout": 3,
    "animated": true,
    "autoHide": true
    },
    "htmlOnPauseBlock": {
    "html": null,
    "height": null,
    "width": null
    },
    "autoPlay": false,
    "mute": true,
    "allowTheatre": true,
    "playPauseAnimation": false,
    "playbackRateEnabled": false,
    "allowDownload": false,
    "playButtonShowing": false,
    "fillToContainer": false,
    "posterImage": ""
    },
    "vastOptions": {
    "adList": [],
    "adCTAText": false,
    "adCTATextPosition": ""
    }
    }
    </script>

    My post content

    <video width="600px" height="auto" id="video-id" controls="controls" data-mce-fragment="1">
    <source src="https://example.com/test.mp4" type="video/mp4" /></video>

    Video is playing, but I get errors in console:

    Uncaught SyntaxError: missing ) after argument list

    I found this tutorial

    At 3:16 his advice is to put “)” on the end

    "adCTATextPosition": ""
    }
    })

    I don`t know, video works but I get errors in console

    Uncaught Could not find a HTML node to attach to for target video-id" fluidplayer.min.js:8:146508
    init https://cdn.fluidplayer.com/v3/current/fluidplayer.min.js:8
    f https://cdn.fluidplayer.com/v3/current/fluidplayer.min.js:8
    <anonimno> https://example.com/test/:1

     

    #5148
    Tomasz Dziuda

    Hi,

    The error suggest that an element with ID ‘video-id’ does not exist in your post, but your code uses it – if the video works, maybe it is a bug with fluid player. In my opinion you should consult this issue with the fluidplayer developers/community.

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.