Skip to main content

Additional YouTube Push questions

Comments

4 comments

  • Todd Thompson

    my youtube push is now working correctly. I guess the developers did a fix and also it seems you cant apply a video effect (watermark) prior to have it upload to youtube.

    still wonder about the manual submit and what is returned in webhook when pushing to youtube?

    0
  • Bane

    Youtube autopush

    When integration is created there is a token that we get in the back. Now the token we get does not work for a very long time - it is time limited by YouTube in this case.

    Of course to make it all automated we use this token to refresh the same automatically later on.

    If for some reason the refreshing is not possible automatically, manual refresh might be needed. We are currently changing the wording on the dashboard to give more sense of what is happening (based on what you mentioned in the tickets and what was happening).

    That way in future it will give you a more precise message of what is needed to be done - if that is the integration can not be automatically refreshed.

    Manual Submit parameter

    You are right in recognition of what steps happen before and when the button is shown. This is actually the desired workflow.

    What this option does is to allow you to know that end user that recorded the video has actually been approved / desired to be uploaded by the end user.

    While in general this is not needed, in some specific circumstances it might be needed to get that additional confirmation.

    * Of course you could implement the similar/same steps through your own codes as well.

    Dynamically changing title and description

    When anything is done in a manner that requires or desires dynamic I would go with JS embeds.

    So based on what you mentioned I would create embedding after this AJAX call returns result.

    For examples on different embedding methods, you can check out this page: https://ziggeo.com/docs/sdks/javascript/browser-integration/embed-methods

    So using the code from the other page:

    <ziggeorecorder
        ziggeo-custom-covershots
        ziggeo-early-rerecord
        id="ziggeo-recorder"
        ziggeo-manualsubmit="true"
        title="mytitle"
        description="mydescription"
        expiration-days="14">
    </ziggeorecorder>

    Your JS alternative would look something like:

    var recorder = new ZiggeoApi.V2.Recorder({
    element: document.getElementById("ziggeo-recorder"),
    attrs: {
    'custom-covershots': true,
    'early-rerecord': true,
    manualsubmit: true,
    title: '{ajax-returned-title}',
    description: '{ajax-returned-title}'
    }
    });

    recorder.activate();

    * You would also move the code from the ready event to this same section. I would personally create a function that accepts title and description as parameters, optionally element as well, making it easy to just call and set up the recorder where needed.

    Webhooks info

    I would just like to confirm that you are asking about the info that you would get once the push was done to YouTube. If so I would suggest checking out the following place that works not just for this event, rather for any other as well.

    Log into your Ziggeo account, click on the application and then Events page. Now in the last dropdown that shows "All types" change it to  "video_stream_push_success". This will show you the list of all push notifications that you would have been sent over webhook (if you set it up).

    This will include the video data, and as such custom data will be available. It will be available in the property of the video data that is titled "data".

    * If your embedding has JSON formated data added to custom-data parameter of the embedding, the "data" parameter of the video data will have that exact same values.

    For example the following link shows the webhook example in the PHP language, and the line I am linking to shows exactly how to get the custom data:

    https://github.com/Ziggeo/ZiggeoPhpSdk/blob/master/demos/webhooks-video_stream_push_success.php#L27

    Now when that webhook info is sent your way it will also have the data about what was used in the "push_stream_data" property of video data.

    For example it will give you the status, time and under "objects>video_data>id" you would get the video ID on YouTube.

    If you are getting multiple push notifications in the same place and you only want to run your code if it is YouTube autopush (and ignore FTP, S3 or other) then you can just check the type property of the "push_stream_data" which will tell you what it is.

    So, checking in the Events page is the best way to quickly check it all out if you are not sure and it should have all the data you might need.

    A suggestion if you are working on coding it all down, you could copy the code from the Events page as the webhook. Then just save that as a data on your page and work on getting the values you need.

    That way you do not need to upload a lot of videos and makes it faster for you to see and get the data you need.

    Once finished, you can just remove your own variable holding the data and test against actual video notification.

    * Again this is just a suggestion if you want to make it easier / faster for yourself.

    Hope this helps :)

    0
  • Todd Thompson

    that is a fantastic answer. Really helpful.

    thanks as always. I'll leave you alone for awhile now lol

    0
  • Bane

    Glad to hear that it helped you Todd.

    Please do feel free to write as many questions as you like - we like questions and to help, so makes sense to ask right :)

    0

Please sign in to leave a comment.