Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

What are you using for streaming video to confluence?

Hi, I am trying to get my company to use Confluence as our intranet.  One thing I would like to have in Confluence is the ability to have training videos there.  Now I know that the multimedia macro will work to stream media, but we have several movies that are very large (2GB or more).  Our IT admins have put an upload restriction on the Confluence Server.  The other issue is that we cannot upload these to any cloud system like YouTube or Vimeo per our information security policy.

With that in mind I'd like to have another server that would run as a streaming server and then be able to "embed" something like an HTML 5 or other player in Confluence.  Basically I'd like to have an internal YouTube application.

What are others out there doing to overcome this issue? 

1 answer

We stored some videos on an external server, and I wrote a user macro to allow embedding of external HTML5 videos in Confluence (mp4 files should be most compatible) based on a user macro of @David Simpson _David Simpson Apps_:

## Macro title: HTML5 Video
## Macro has a body: N
##
## @param width:title=Width|type=string|required=false|desc=Video width
## @param height:title=Height|type=string|required=false|desc=Video height
## @param poster:title=Poster|type=string|required=false|desc=Set a placeholder image
## @param src:title=Source|type=string|required=true|desc=Attached video filename
## @param External:title=External Video|type=boolean|required=true
## @param Override:title=Override Extension|type=string|required=false|desc=Enter file extension to override

#if ( $paramExternal != "true" )
#set ( $attachment = $content.getAttachmentNamed($paramsrc) )
#set ( $extension = $attachment.getFileExtension() )
#set ( $path = $attachment.getDownloadPath() )
#else
#set ( $last3 = $paramsrc.length() - 3 )
#set ( $extension = $paramsrc.substring($last3) )
#set ( $path = $paramsrc )
#end

#if ( $paramOverride )
#set ( $extension = $paramOverride )
#end

#if ( $extension == "m4v" )
#set ( $mimetype = "video/mp4" )
#else
#set ( $mimetype = "video/" + $extension )
#end

<video controls="controls"
#if ($paramwidth) width="$paramwidth" #end
#if ($paramheight) height="$paramheight" #end
#if ($paramposter) poster="$paramposter" #end ## Set a placeholder image for the video
src="$path">
<source type="$mimetype" src="$path" />
</video>
<p>
<strong>Download video:</strong> <a href="$path">$extension format</a>
</p>

I wrote another user macro to link to a specific time in the video:

## @param VideoFilename:title=Video Filename|type=string|required=true|desc=Enter file name of the video to which you want to link to a specific time
## @param Timestamp:title=Timestamp|type=string|required=true|desc=Enter timestamp in the video to which you want to jump (hh:mm:ss, mm:ss, or ss)
<a href="javascript&colon;void(0)" class="video-timestamp-link" data-video-filename="${paramVideoFilename}" data-timestamp="${paramTimestamp}">$paramTimestamp</a>
<script>

function hmsToSeconds(str) {
var p = str.split(':'),
s = 0, m = 1;
while (p.length > 0) {
s += m * parseInt(p.pop(), 10);
m *= 60;
}
return s;
}

jQuery(".video-timestamp-link").click(function() {
var v = jQuery('video[src*="' + jQuery(this).attr("data-video-filename") + '"]');
if (v.length) {
v.get(0).currentTime = hmsToSeconds(jQuery(this).attr("data-timestamp"));
}
});

</script>

 Maybe that will help :)

So that's what I was thinking... Thanks for the Macro I'll give it a shot.

So how do you have your backend server running?  Is it just a regular HTTP (like Apache or IIS)?  Or do you have some streaming server running?

Just standard HTTP, that's worked OK for us. Modern browsers are pretty good at handling static video files these days.

@Stephen Deutsch  -  In order to use the above user macro the source should be the path? 

I am trying to save the vide file on server (AWS cloud), should I have to give that path?

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

Announcing Team Calendars in Confluence Data Center

Hi Community! We're thrilled to share that Team Calendars for Confluence is now a built-in feature for Confluence Data Center releases 7.11 and beyond.  A long time favorite,  Team Cale...

198 views 0 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you