gets a canonical path to an embedded iframe of the video from the hub

        :return: the path to create an embedded iframe of the video
        :rtype: str
543972
def get_embed_url(self, targeting=None, recirc=None):
        
        url = getattr(settings, "VIDEOHUB_EMBED_URL", self.DEFAULT_VIDEOHUB_EMBED_URL)
        url = url.format(self.id)
        if targeting is not None:
            for k, v in sorted(targeting.items()):
                url += '&{0}={1}'.format(k, v)
        if recirc is not None:
            url += '&recirc={0}'.format(recirc)
        return url
1129079
def get_course_video_image_url(course_id, edx_video_id):
    
    try:
        video_image = CourseVideo.objects.select_related('video_image').get(
            course_id=course_id, video__edx_video_id=edx_video_id
        ).video_image
        return video_image.image_url()
    except ObjectDoesNotExist:
        return None
1285789
def _get_movielens_path():
    

    return os.path.join(os.path.dirname(os.path.abspath(__file__)),
                        'movielens.zip')
979756
def hash_thesubdb(video_path):
    
    readsize = 64 * 1024
    if os.path.getsize(video_path) < readsize:
        return
    with open(video_path, 'rb') as f:
        data = f.read(readsize)
        f.seek(-readsize, os.SEEK_END)
        data += f.read(readsize)

    return hashlib.md5(data).hexdigest()
128394
def get_video_json(video):
    

    return json.dumps({
        'id': video.id,
        'edit_link': reverse('wagtailvideos:edit', args=(video.id,)),
        'title': video.title,
        'preview': {
            'url': video.thumbnail.url if video.thumbnail else '',
        }
    })
528282
def path(self, which=None):
        
        base = urljoin(
            self._server_config.url + '/',
            self._meta['api_path']  # pylint:disable=no-member
        )
        if (which == 'self' or which is None) and hasattr(self, 'upload_id'):
            # pylint:disable=E1101
            return urljoin(base + '/', str(self.upload_id))
        return super(ContentUpload, self).path(which)
1217367
def remote_path(self):
        
        # TODO: move this property into independent object for PG
        if len(self.book_id) > 1:
            path_parts = list(self.book_id[:-1])
        else:
            path_parts = ['0']
        path_parts.append(self.book_id)
        return os.path.join(*path_parts) + '/'
229158
def to_array(self):
        
        array = super(InlineQueryResultVideo, self).to_array()
        array['type'] = u(self.type)  # py2: type unicode, py3: type str

        array['id'] = u(self.id)  # py2: type unicode, py3: type str

        array['video_url'] = u(self.video_url)  # py2: type unicode, py3: type str

        array['mime_type'] = u(self.mime_type)  # py2: type unicode, py3: type str

        array['thumb_url'] = u(self.thumb_url)  # py2: type unicode, py3: type str

        array['title'] = u(self.title)  # py2: type unicode, py3: type str

        if self.caption is not None:
            array['caption'] = u(self.caption)  # py2: type unicode, py3: type str

        if self.parse_mode is not None:
            array['parse_mode'] = u(self.parse_mode)  # py2: type unicode, py3: type str

        if self.video_width is not None:
            array['video_width'] = int(self.video_width)  # type int
        if self.video_height is not None:
            array['video_height'] = int(self.video_height)  # type int
        if self.video_duration is not None:
            array['video_duration'] = int(self.video_duration)  # type int
        if self.description is not None:
            array['description'] = u(self.description)  # py2: type unicode, py3: type str

        if self.reply_markup is not None:
            array['reply_markup'] = self.reply_markup.to_array()  # type InlineKeyboardMarkup

        if self.input_message_content is not None:
            array['input_message_content'] = self.input_message_content.to_array()  # type InputMessageContent

        return array
1229810
def absolute_path(self, path, minify=True):
        '''
        '''
        if minify:
            ending = '.%s' % self.mediatype
            if not path.endswith(ending):
                if self.minified:
                    path = '%s.min' % path
                path = '%s%s' % (path, ending)
        #
        if self.is_relative(path) and self.media_path:
            return '%s%s' % (self.media_path, path)
        elif self.asset_protocol and path.startswith('//'):
            return '%s%s' % (self.asset_protocol, path)
        else:
            return path
1239265
def path(self):
        
        raw_path = wsgi_decoding_dance(
            self.environ.get("PATH_INFO") or "", self.charset, self.encoding_errors
        )
        return "/" + raw_path.lstrip("/")
440452
def get_url(videoobj,liveconvert = false)
      raise NoMethodError, "Please pass a VideoObject" if not videoobj.is_a? VideoObject
      
      begin
        if liveconvert
          request("livePlaybackService","initLivePlayback",[conversion_settings(videoobj)])['result']['contentURL']
        else
          request("playbackService","initPlayback",[videoobj.location[1..-1]])['result']['contentURL']
        end
      rescue NoMethodError
        raise RuntimeError, "This video does not exist"
      end
    end
1365227
def path(self, which=None):
        
        if which in ('download_html',):
            return '{0}/{1}'.format(
                super(ArfReport, self).path(which='self'),
                which
            )
        return super(ArfReport, self).path(which)
1154583
def localDirPath(self):
        
        rootDirPath = os.environ[self.rootDirPathEnvName]
        return os.path.join(rootDirPath, self.contentHash)
748313
def _add_video_timing(self, pic):
        
        sld = self._spTree.xpath('/p:sld')[0]
        childTnLst = sld.get_or_add_childTnLst()
        childTnLst.add_video(pic.shape_id)
981684
def path(self):
        
        return "/".join([
            part
            for part in [
                self.version,
                self.qualifier,
            ]
            if part
        ])
169793
function(doc, src) {
		var iframe = doc.createElement("iframe");
		var spirit = this.possess(iframe);
		spirit.css.add("gui-iframe");
		/*
		 * TODO: should be moved to src() method (but fails)!!!!!
		 */
		if (src) {
			if (gui.URL.external(src, doc)) {
				var url = new gui.URL(doc, src);
				spirit.xguest = url.protocol + "//" + url.host;
				//src = this.sign ( src, doc, spirit.$instanceid );
			}
		} else {
			src = this.SRC_DEFAULT;
		}
		iframe.src = src;
		return spirit;
	}
1373356
def _load_bundle_map(self):
        '''
        
        '''
        bundle_map = {}
        next_href = None
        has_next = True

        while has_next:
            bundles = self.clarify_client.get_bundle_list(href=next_href, embed_items=True)
            items = get_embedded_items(bundles)
            for item in items:
                bc_video_id = item.get('external_id')
                if bc_video_id is not None and len(bc_video_id) > 0:
                    bundle_map[bc_video_id] = item
            next_href = get_link_href(bundles, 'next')
            if next_href is None:
                has_next = False
        return bundle_map