Email and embed features in an overlay JavaScript Tools - Demo 3 / 5
Click on this button to see overlayed sharing functionality.
Features
The email feature is disabled at the moment. We don't want to take a risk of being listed as a spamming site.
In Flowplayer, sharing and embedding functionalities are implemented with standard HTML techniques instead of hard-coding them inside the Flash component. This has significant benefits:
- You can layout your forms the way you like.
- The look and feel is controlled with CSS. Every aspect of the previous demo can be controlled by you.
- You can use your own messages in your own language!
- You can add more tabs which can contain whatever content you want.
Email and embedding can be done in many ways. This demo area introduces you to only two different examples.
Implementation
When sharing dialogs are present, the player is hidden and set to its paused state. When sharing is closed, the player resumes. The trick is to use the hide() and show() methods from the Flowplayer API that can handle these kinds of situations. If you just hide the Flash components using the CSS setting display:none, then the Flash is unloaded and needs to re-initialize itself again when being shown.
The email form uses flowplayer.org as the mail server. You can use this server, but we take no responsibility for the reliability of the service. Additionally, all emails are appended with a flowplayer specific footer which contains a link back to the flowplayer.org home page. The preferred method of implementing email-based sharing is point to your own service by changing your form's action attribute to point to your new service.
In this example, the email form is sent to flowplayer.org using JSONP technology that allows you to invoke AJAX services with JavaScript that is located on a different domain than where your page is located. However, you can implement your own form submission the way you want. If you want to get detailed help on implementing sharing on your site, consult our forums or buy Support Items.
Here is a list of form fields that the flowplayer.org mailing service uses:
| Field name | Extra | Description |
|---|---|---|
| to | required | Recipient addresses. Multiple addresses need to be separated by commas. |
| message | optional | A user supplied message |
| userFromName | optional | Name of the sender |
| userFromEmail | optional | Email of the sender |
| fromEmail | hidden | The default sender email when user does not supply their own. |
| fromName | hidden | The default sender name when user does not supply their own. |
| subject | hidden | The default subject for the message. If not given, the first 50 characters from the message body is used as the subject. |
| url | hidden | A link to the video page that is appended to the message body. |
| header | hidden | If the user does not supply any message body, this field value is used as a default message. |