Exemplo n.º 1
0
    def _create_amf_request(self, key, video_player, player_id):
        content_override = ContentOverride(int(video_player))
        viewer_exp_req = ViewerExperienceRequest(self.url, [content_override],
                                                 int(player_id), key)

        req = AMFPacket(version=3)
        req.messages.append(
            AMFMessage(
                "com.brightcove.experience.ExperienceRuntimeFacade.getDataForExperience",
                "/1", [self.AMFMessagePrefix, viewer_exp_req]))

        return req
Exemplo n.º 2
0
    def _create_amf_request(self, key, video_player, player_id):
        if video_player.startswith("ref:"):
            content_override = ContentOverride(contentRefId=video_player[4:])
        else:
            content_override = ContentOverride(contentId=int(video_player))
        viewer_exp_req = ViewerExperienceRequest(self.url, [content_override],
                                                 int(player_id), key)

        req = AMFPacket(version=3)
        req.messages.append(
            AMFMessage(
                "com.brightcove.experience.ExperienceRuntimeFacade.getDataForExperience",
                "/1", [AMF_MESSAGE_PREFIX, viewer_exp_req]))

        return req