Skip to content

Instantly share code, notes, and snippets.

@lfreeland
Last active March 18, 2018 23:48
Show Gist options
  • Select an option

  • Save lfreeland/b929c4c28af02315db975884a2b0be2b to your computer and use it in GitHub Desktop.

Select an option

Save lfreeland/b929c4c28af02315db975884a2b0be2b to your computer and use it in GitHub Desktop.
Lightning Record Video Viewer Component Markup
<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes" access="global" controller="RecordVideoViewerController">
<aura:attribute name="videoField" type="String" description="The api name of the field from the given object that has the video's source URL." />
<aura:attribute name="videoHeight" type="String" description="Height for the video player." />
<aura:attribute name="videoWidth" type="String" description="Width for the video player." />
<aura:attribute name="videoSrcUrl" type="String" access="private" />
<aura:handler name="init" value="{!this}" action="{!c.init}" />
<div class="slds-box slds-theme_default">
<iframe width="{! v.videoWidth }"
height="{! v.videoHeight }"
src="{! v.videoSrcUrl }"
frameborder="0"
allow="autoplay; encrypted-media"
allowfullscreen="allowfullscreen" />
</div>
</aura:component>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment