Jump to content

Search the Community

Showing results for tags 'embed codes'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • General Discussion
    • Announcements
    • Business Discussion
    • Business Services
    • Sell and Buy
  • Themes & templates
    • KVS default theme
    • KVS tablet theme
    • KVS paysite theme
    • KVS basic theme 1
    • KVS basic theme 2
    • KVS basic theme 3
  • Educational / support
    • Technical Support
    • FAQ
    • Educational Series

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



About Me

Found 4 results

  1. Using KVS as a primary content manager for multiple frontends via embed codes If you have or plan a network of multiple sites that use other frontend engine, for example Wordpress, you can still benefit from KVS super powerful video management features by using KVS as you primary content manager and delivering content via KVS embed codes. You can also use this scenario with other KVS licenses (typically Basic), but the key point here is that you don't necessary need to install KVS on every site of your network, you can just use it as your primary solution. Pros: Best way to use KVS with other scripts! Content can be shared or divided between sites, no duplicate files. Single place to manage all your content storage and streaming in one, unified way. Can use ALL KVS video content management features, including multiserver, timeline screenshots, grabbers, multiformats (KVS Advanced+). Can use ALL KVS player features, player advertising and stats. Can show related videos generated by KVS inside player. Can use KVS exporting feeds (KVS Ultimate) to automate content delivery to your other sites, if they support import from feeds. Can configure individual player settings + advertising for each site using KVS embed player profiles. Can have unique titles, screenshots, comments, rating and popularity across the network. Cons: Should use iframes to deliver video player, but domains are overridden. Requires some advanced server configuration to configure aliases (see below). Requires purchasing KVS open source code option for using aliases. Price: $$$ of KVS license of your choice + open source code option ($299) + alias license for every new domain in the network ($1-$50 depending on the amount). Typically no more than $1000 for all your network if you are using Wordpress or other free software for your network sites. From the other hand you get most of killing KVS features and scale them to your network. The idea behind this scenario is that you will need to hide the domain where KVS is installed and instead use embed codes from subdomains of you other project domains. Here is an example of typical KVS embed code, where kvs-demo.com is the primary domain of your KVS installation: <iframe width="854" height="480" src="https://kvs-demo.com/embed/123" frameborder="0" allowfullscreen></iframe> If you want to embed its videos on domain2.com, you will need to create subdomain video.domain2.com that is configured as alias for kvs-demo.com. Then you can use embed codes using this subdomain: <iframe width="854" height="480" src="https://video.domain2.com/embed/123" frameborder="0" allowfullscreen></iframe> In KVS admin panel Settings -> Embed player settings you will need to create a new embed player profile for domain2.com domain. This profile will let you configuring individual player settings for all videos that are played on domain2.com. Using KVS as a primary content manager for multiple frontends via hotlinks This option is similar to the previous one, but instead of using embed iframes you can hotlink video files stored in KVS from other projects. This can also work with both KVS and other scripts, but this approach has less advantages, especially for non-KVS network. Pros: No iframe usage. Content can be shared or divided between sites, no duplicate files. Can use SOME of KVS video content management features, including multiserver, grabbers. Can use KVS exporting feeds (KVS Ultimate) to automate content delivery to your other sites. Can have unique titles, screenshots, comments, rating and popularity across the network. Cons: No multiformats is possible. No timeline screenshots. With non-KVS frontends you can't use KVS player or advertising features. Limited content migration: hotlinked content will stop working if migrated to another storage group. Video files are hotlinked from primary domain and there is no way to hide or replace it. Price: $$$ of KVS license of your choice + $$$ of other network sites either KVS or other script. Typically network KVS sites are KVS Basic licenses in this case. Using KVS satellites to build network sites KVS satellites are special license types that try to combine benefits from both having separate projects and sharing the same set or subset of content from one big database. Satellites are different from other KVS projects that they are connecting to the same database as your primary KVS does, and they are using database data directly. If you want to use KVS for all your network sites, then satellites are probably the best scheme for you. Pros: Best way to use KVS with KVS! Content can be shared or divided between sites, no duplicate files. Single place to manage all your content storage and streaming in one, unified way. Can use ALL KVS video content management, player and advertising features without any limitations. Can have unique titles and descriptions across the network (KVS Ultimate). No need to configure feeds to sync content. All content is managed from the same admin panel for all network. Cons: Requires some advanced KVS configuration to divide content between satellites if you don't want to automatically show all content from the primary database. This is typically configured by our tech support. Requires some advanced server configuration if satellites should be hosted on remote servers. Many satellites can result in database overload for big databases. Can't have unique screenshots, comments, rating and popularity across the network. Shares the same members database for all sites. Price: $$$ of KVS Ultimate license + KVS Satellite license for each network site ($99 - $249 depending on the amount).
  2. KVS will allow embedding your content from anywhere by default. If you want to completely disallow embedding your videos on other sites, please check this guide: How to disable embedding your content on other sites and redirect embeds to your site Blacklisting domains You can see which 3rd-party domains embed your videos in Stats -> Embed usage. These stats may contain data for long period, so it makes sense to use filters to limit data to the last week or month. If you want to disallow specific domains from using your embed codes, go to Settings -> Embed player settings and specify blacklisted domains under Embed code access limitation: Whitelisting domains Another common configuration scenario is when you want to only allow your other projects to embed your videos, and disallow any other 3rd-party sites. This should be configured in 2 steps: 1) Go to Settings -> Embed player settings and create a new Embed player profile. Specify whitelisted domains under this profile settings and make sure this profile is configured as you need (e.g. video formats display, advertising), because the new profile will only copy few display options from default profile: 2) In Settings -> Embed player settings switch to default Embed player profile and under Video formats display remove all slots: Such settings will prevent embedding your videos on all sites except domains listed under Whitelisted embed profile that you created in step 1. If you need to whitelist more domains, just edit Whitelisted profile and add more domains. If you need different embed player settings on different whitelisted domains, you can create more embed player profiles up to a single profile per domain: each with unique settings, e.g. branding or advertising.
  3. KVS features embed player with a special settings page (Settings -> Embed player settings), where you can even modify template code, however you won't be able to render playlist info using that template. In order to do that you should create a new page in Website UI section. This tutorial provides step by step instruction on how to do that. 1) Create a new page using Website UI page editor (Website UI -> Add page). Set any title you want, set External ID to embed_playlist, set Cache lifetime to 86400. Use the following template code: {{insert name="getBlock" block_id="playlist_view" block_name="Playlist" assign="playlist_html"}} {{insert name="getBlock" block_id="video_view" block_name="Video" assign="video_html"}} <html> <head> <title>{{$storage.video_view_video.title}} - {{$storage.playlist_view_playlist.title}}</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <link href="{{$storage.playlist_view_playlist.canonical_url}}" rel="canonical"/> {{if $storage.video_view_video.description!=''}} <meta name="description" content="{{$storage.video_view_video.description}}"/> {{/if}} {{if $storage.video_view_video.tags_as_string!=''}} <meta name="keywords" content="{{$storage.video_view_video.tags_as_string}}"/> {{/if}} <meta name="viewport" content="width=device-width, initial-scale=1"> <meta property="og:title" content="{{$storage.video_view_video.title}} - {{$storage.playlist_view_playlist.title}}"/> <meta property="og:image" content="{{$storage.video_view_video.preview_url}}"/> <meta property="og:description" content="{{$storage.video_view_video.description}}"/> <style type="text/css"> /* playlist videos */ .playlist { position: absolute; left: 10px; top: 10px; margin: 0; padding: 0; z-index: 252; } .playlist li { padding: 2px; margin: 0; list-style: none; color: #ffffff; } .playlist li a { color: inherit; text-decoration: none; } .playlist li.active { background: #ffffff; color: #000000; } /* related videos in player */ .player-related-videos { position: absolute; left: 0; top: 0; right: 0; bottom: 0; padding: 5px 10px 30px 10px; background: #000000; overflow: hidden; } .player-related-videos .player-related-videos-container { position: relative; width: 100%; height: 100%; overflow: hidden; text-align: center; } .player-related-videos .player-related-videos-item { position: relative; display: inline-block; vertical-align: middle; margin-top: 5px; } .player-related-videos .player-related-videos-item .title { display: none; position: absolute; left: 0; top: 0; right: 0; height: 52px; overflow: hidden; text-align: left; padding: 5px; color: #ffffff; background: -moz-linear-gradient(top, rgba(12, 12, 12, 0.8) 0px, transparent 50px); background: -webkit-gradient(linear, left top, left bottom, color-stop(0px, rgba(12, 12, 12, 0.8)), color-stop(50px, transparent)); background: -webkit-linear-gradient(top, rgba(12, 12, 12, 0.8) 0px, transparent 50px); background: -o-linear-gradient(top, rgba(12, 12, 12, 0.8) 0px, transparent 50px); background: -ms-linear-gradient(top, rgba(12, 12, 12, 0.8) 0px, transparent 50px); background: linear-gradient(to bottom, rgba(12, 12, 12, 0.8) 0px, transparent 50px); } .player-related-videos .player-related-videos-item .duration { display: none; position: absolute; bottom: 5px; right: 5px; color: #ffffff; background: rgba(12, 12, 12, 0.8); padding: 2px 5px; } .player-related-videos .player-related-videos-item:hover .title, .player-related-videos .player-related-videos-item:hover .duration { display: block; } .error-message { width: 100%; text-align: center; position: absolute; top: 49% } </style> </head> <body style="margin: 0; padding: 0; background: #000; color: #fff"> {{$video_html|smarty:nodefaults}} {{$playlist_html|smarty:nodefaults}} </body></html> NOTE: in order to create a new page with embed_playlist ID, you should either put 777 filesystem permissions to your website root, or copy /admin/tools/page_template.php to /embed_playlist.php manually. If you don't, KVS won't let you create this page in most cases. Some brief explanation: we will use playlist_view block to render list of playlist videos as an <UL> component; and we will use video_view block to render embed player. We will use CSS absolute positioning with z-index manipulation to render playlist on top of embed player. After you created this page, in Website UI -> Pages you will find this page created with 2 blocks: 2) Open Playlist block for editing. You will find that it is initialized with default template. Use the following template code for it to render list of videos in this playlist: <ul class="playlist"> {{foreach from=$data.videos item="item"}} <li {{if $item.video_id==$smarty.get.video_id}}class="active"{{/if}}><a href="{{$config.project_url}}/embed/{{$item.video_id}}?playlist_id={{$data.playlist_id}}">{{$item.title}}</a></li> {{/foreach}} </ul> Under parameters enable var_playlist_id = playlist_id (change its default value). You can also use sort_by parameter if you need to change default sorting of the playlist videos. IMPORTANT! Make sure you put video_id into Dynamic HTTP parameters option. This is required to avoid caching issues with rendering this block for different videos. 3) Open Video block for editing. Use the following template code for it to render embed player code: {{if $data.status_id==5}} <div class="error-message">{{$data.delete_reason|default:$lang.videos.video_player_not_allowed}}</div> {{elseif $data.can_watch==0}} <div class="error-message">{{$lang.videos.video_player_not_allowed}}</div> {{else}} {{if $data.load_type_id==3}} {{$data.embed|regex_replace:'/width="[0-9]+"/':'width="100%"'|regex_replace:'/height="[0-9]+"/':'height="100%"'|smarty:nodefaults}} {{elseif $flashvars_embed.video_url==''}} <div class="error-message">{{$lang.videos.video_player_not_allowed}}</div> {{else}} <div style="width: 100%; height: 100%;"><div id="kt_player"></div></div> <script type="text/javascript" src="{{$config.project_url}}/player/kt_player.js?v={{$config.project_version}}"></script> <script type="text/javascript"> /* <![CDATA[ */ function getEmbed() { var embedCode = '<iframe width="{{$player_size_embed[0]}}" height="{{$player_size_embed[1]}}" src="{{$config.project_url}}/embed/{{$data.video_id}}?playlist_id={{$smarty.get.playlist_id}}" frameborder="0" allowfullscreen>'; embedCode += '</iframe>'; return embedCode; } var flashvars = { {{foreach name=data key=key item=item from=$flashvars_embed}} {{$key}}: '{{$item|replace:"'":"\'"}}'{{if !$smarty.foreach.data.last}}, {{/if}} {{/foreach}} }; {{if $smarty.request.skin=='black'}} flashvars['skin'] = 'dark.css'; {{elseif $smarty.request.skin=='white'}} flashvars['skin'] = 'white.css'; {{/if}} {{if $smarty.request.autoplay=='true' || $smarty.request.autoplay=='1'}} flashvars['autoplay'] = 'true'; {{elseif $smarty.request.autoplay=='false' || $smarty.request.autoplay=='0'}} flashvars['autoplay'] = 'false'; {{/if}} kt_player('kt_player', '{{$config.project_url}}/player/kt_player.swf?v={{$config.project_version}}', '100%', '100%', flashvars); /* ]]> */ </script> {{/if}} {{/if}} Under parameters enable var_video_id = video_id (change its default value). 4) The page is fully functional now. The final step it to make sure its URL is working. In order to do that we need to modify URL rewrites in the main .htaccess file. By default KVS uses the following URLs for single video embed codes: https://www.kvs-demo.com/embed/38 The idea is to add playlist_id parameter to single embed URLs to get playlist embed URLs: https://www.kvs-demo.com/embed/38?playlist_id=1 So in .htaccess we need to add the following rule - if request URI is standard embed code pattern (^embed/(.+)$) AND there is a playlist_id parameter given, then render it as a playlist embed code. In order to specify this, put the following code into the beginning of .htaccess file: RewriteCond %{QUERY_STRING} playlist_id=([0-9]+) RewriteRule ^embed/(.+)$ embed_playlist.php?video_id=$1 [L,QSA] Finally, all pieces are in place and you can see how it works: https://www.kvs-demo.com/embed/38?playlist_id=1 And the same video without playlist: https://www.kvs-demo.com/embed/38 You can find this page coded in demo admin panel at this URL: https://kvs-demo.com/admin/project_pages.php?action=change&item_id=embed_playlist
  4. KVS allows embedding of your content by default. In order to disable that go to Settings -> Embed player settings and remove all video formats from display slots: Your embed codes will not be showing video player anymore. Now if you also want to redirect traffic from all other sites that used your embed codes, you can add this block of code in Embed code template: <script> if (window.top != window.self) { window.top.location = '{{$data.canonical_url}}'; } else { window.location = '{{$data.canonical_url}}'; } </script> Then all users which open other sites with your embed codes will be redirected to your videos that were embedded.
  • Create New...