JW Player position

I’ve experimenting with RTMP through s2Member and JWPlayer.

The [s2STream] shortcode appends the player to the top of the page. This means it is not possible to have the player inline in between other brother containers. Strangely enough, in the page source code the player code actually appears above the other elements that were programmed above it.

An example can be seen in: http://davidncatia.com/courses/streaming where the

and bellow text where actually manually coded above the player container. Anyone has an idea why this is happening?
Is it a bug on my side?

Current status: Wordpress 4.7, s2Member 161129, JWPlayer 6.12.495, Using Amazon S3 and CloudFront for RTMP, Chrome 55.0.2883.87

I got a 404 when trying to access your link.

This sort of problem usually arises when the code embedded in the shortcode uses echo instead of return.

I think you should report this behavior here and see whether it’s a bug or a feature (i.e. whether there’s a specific reason for it): https://github.com/WebSharks/s2Member/issues

I think I might have found the culprit. Try this:

Go to /wp-content/plugins/s2member/src/includes/menu-pages/code-samples/jwplayer-streaming-mp4.x-php and find line 15, which currently reads:

var mp4 = [s2File download="<?php echo $s2_jw_config["mp4_video_file_name"]; ?>" url_to_storage_source="true" count_against_user="true" get_streamer_json="true" /];

Replace that with this:

var mp4 = [s2File download="<?php return $s2_jw_config["mp4_video_file_name"]; ?>" url_to_storage_source="true" count_against_user="true" get_streamer_json="true" /];

and save the file.

What happens now?

Hi KTS915,

Yes, that little return made the trick for me. That’s awesome. Thank you so much.

Case closed

Great! Thanks for letting me know!