How to use edxval - 3 common examples

To help you get started, we’ve selected a few edxval examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / xblock-azure-media-services / azure_media_services / ams.py View on Github external
def get_list_stream_videos(self):
        return Video.objects.filter(
            courses__course_id=self.location.course_key,
            courses__is_hidden=False,
            status__in=["file_complete", "file_encrypted"]
        ).order_by('-created', 'edx_video_id')
github microsoft / xblock-azure-media-services / azure_media_services / ams.py View on Github external
def get_captions_and_video_info(self, data, suffix=''):
        edx_video_id = data.get('edx_video_id')

        try:
            video = Video.objects.get(edx_video_id=edx_video_id)
        except Video.DoesNotExist:
            asset = None
        else:
            media_service = get_media_service_client(self.location.org)
            asset = media_service.get_input_asset_by_video_id(edx_video_id, 'ENCODED')

        error_message = _("Target Video is no longer available on Azure or is corrupted in some way.")
        captions = []
        video_info = {}
        asset_files = None

        if asset:
            locator_on_demand = media_service.get_asset_locators(asset['Id'], LocatorTypes.OnDemandOrigin)
            locator_sas = media_service.get_asset_locators(asset['Id'], LocatorTypes.SAS)

            if locator_on_demand:
                error_message = ''
github microsoft / xblock-azure-media-services / azure_media_services / ams.py View on Github external
def get_captions_and_video_info(self, data, suffix=''):
        edx_video_id = data.get('edx_video_id')

        try:
            video = Video.objects.get(edx_video_id=edx_video_id)
        except Video.DoesNotExist:
            asset = None
        else:
            media_service = get_media_service_client(self.location.org)
            asset = media_service.get_input_asset_by_video_id(edx_video_id, 'ENCODED')

        error_message = _("Target Video is no longer available on Azure or is corrupted in some way.")
        captions = []
        video_info = {}
        asset_files = None

        if asset:
            locator_on_demand = media_service.get_asset_locators(asset['Id'], LocatorTypes.OnDemandOrigin)
            locator_sas = media_service.get_asset_locators(asset['Id'], LocatorTypes.SAS)

            if locator_on_demand:

edxval

edx-val

AGPL-3.0
Latest version published 7 months ago

Package Health Score

65 / 100
Full package analysis