LR录制时event一直为0

本文介绍了一种解决在使用IE浏览器进行网页录制时出现空白页的问题的方法。具体步骤是在IE浏览器的Internet选项高级设置中取消勾选“启用第三方浏览器扩展”。这一解决方案有助于确保录制过程顺利进行。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

问题:

输入URL点击录制后,打开的IE浏览器一直为空白页。

 

解决:

在IE——>工具——>Internet 选项——>高级中,勾掉“启用第三方浏览器扩展”

static int media_get_socket(void* handle) { MediaIOPriv* priv = handle; if (!priv || priv->socket <= 0) return -EINVAL; return priv->socket; } /**************************************************************************** * Public Functions ****************************************************************************/ int media_process_command(const char* target, const char* cmd, const char* arg, char* res, int res_len) { return media_proxy(MEDIA_ID_GRAPH, NULL, target, cmd, arg, 0, res, res_len); } void media_graph_dump(const char* options) { media_proxy(MEDIA_ID_GRAPH, NULL, NULL, "dump", options, 0, NULL, 0); } void* media_player_open(const char* params) { return media_open(MEDIA_ID_PLAYER, params); } int media_player_close(void* handle, int pending_stop) { return media_close(handle, pending_stop); } int media_player_set_event_callback(void* handle, void* cookie, media_event_callback event_cb) { return media_set_event_cb(handle, cookie, event_cb); } int media_player_prepare(void* handle, const char* url, const char* options) { return media_prepare(handle, url, options); } int media_player_reset(void* handle) { if (!handle) return -EINVAL; media_close_socket(handle); return media_proxy_once(handle, NULL, "reset", NULL, 0, NULL, 0); } ssize_t media_player_write_data(void* handle, const void* data, size_t len) { return media_process_data(handle, true, (void*)data, len); } int media_player_get_sockaddr(void* handle, struct sockaddr_storage* addr) { return media_get_sockaddr(handle, addr); } void media_player_close_socket(void* handle) { media_close_socket(handle); } int media_player_get_socket(void* handle) { return media_get_socket(handle); } int media_player_start(void* handle) { if (!handle) return -EINVAL; return media_proxy_once(handle, NULL, "start", NULL, 0, NULL, 0); } int media_player_stop(void* handle) { if (!handle) return -EINVAL; media_close_socket(handle); return media_proxy_once(handle, NULL, "stop", NULL, 0, NULL, 0); } int media_player_pause(void* handle) { return media_proxy_once(handle, NULL, "pause", NULL, 0, NULL, 0); } int media_player_seek(void* handle, unsigned int msec) { char tmp[32]; snprintf(tmp, sizeof(tmp), "%u", msec); return media_proxy_once(handle, NULL, "seek", tmp, 0, NULL, 0); } int media_player_set_looping(void* handle, int loop) { char tmp[32]; snprintf(tmp, sizeof(tmp), "%d", loop); return media_proxy_once(handle, NULL, "set_loop", tmp, 0, NULL, 0); } int media_player_is_playing(void* handle) { char tmp[32]; int ret; ret = media_proxy_once(handle, NULL, "get_playing", NULL, 0, tmp, sizeof(tmp)); return ret < 0 ? ret : !!atoi(tmp); } int media_player_get_position(void* handle, unsigned int* msec) { char tmp[32]; int ret; if (!msec) return -EINVAL; ret = media_proxy_once(handle, NULL, "get_position", NULL, 0, tmp, sizeof(tmp)); if (ret >= 0) *msec = strtoul(tmp, NULL, 0); return ret; } int media_player_get_duration(void* handle, unsigned int* msec) { char tmp[32]; int ret; if (!msec) return -EINVAL; ret = media_proxy_once(handle, NULL, "get_duration", NULL, 0, tmp, sizeof(tmp)); if (ret >= 0) *msec = strtoul(tmp, NULL, 0); return ret; } int media_player_get_latency(void* handle, unsigned int* latency) { char tmp[32]; int ret; if (!latency) return -EINVAL; ret = media_proxy_once(handle, NULL, "get_latency", NULL, 0, tmp, sizeof(tmp)); if (ret >= 0) *latency = strtoul(tmp, NULL, 0); return ret; } int media_player_set_volume(void* handle, float volume) { char tmp[32]; snprintf(tmp, sizeof(tmp), "%f", volume); return media_proxy_once(handle, NULL, "volume", tmp, 0, NULL, 0); } int media_player_get_volume(void* handle, float* volume) { char tmp[32]; int ret; if (!volume) return -EINVAL; ret = media_proxy_once(handle, NULL, "get_volume", NULL, 0, tmp, sizeof(tmp)); if (ret >= 0) { sscanf(tmp, "vol:%f", volume); ret = 0; } return ret; } int media_player_set_property(void* handle, const char* target, const char* key, const char* value) { return media_proxy_once(handle, target, key, value, 0, NULL, 0); } int media_player_get_property(void* handle, const char* target, const char* key, char* value, int value_len) { return media_proxy_once(handle, target, key, NULL, 0, value, value_len); } void* media_recorder_open(const char* params) { return media_open(MEDIA_ID_RECORDER, params); } int media_recorder_close(void* handle) { return media_close(handle, 0); } int media_recorder_set_event_callback(void* handle, void* cookie, media_event_callback event_cb) { return media_set_event_cb(handle, cookie, event_cb); } int media_recorder_prepare(void* handle, const char* url, const char* options) { return media_prepare(handle, url, options); } int media_recorder_reset(void* handle) { if (!handle) return -EINVAL; media_close_socket(handle); return media_proxy_once(handle, NULL, "reset", NULL, 0, NULL, 0); } ssize_t media_recorder_read_data(void* handle, void* data, size_t len) { return media_process_data(handle, false, data, len); } int media_recorder_get_sockaddr(void* handle, struct sockaddr_storage* addr) { return media_get_sockaddr(handle, addr); } int media_recorder_get_socket(void* handle) { return media_get_socket(handle); } void media_recorder_close_socket(void* handle) { media_close_socket(handle); } int media_recorder_start(void* handle) { return media_proxy_once(handle, NULL, "start", NULL, 0, NULL, 0); } int media_recorder_pause(void* handle) { return media_proxy_once(handle, NULL, "pause", NULL, 0, NULL, 0); } int media_recorder_stop(void* handle) { if (!handle) return -EINVAL; media_close_socket(handle); return media_proxy_once(handle, NULL, "stop", NULL, 0, NULL, 0); } int media_recorder_set_property(void* handle, const char* target, const char* key, const char* value) { return media_proxy_once(handle, target, key, value, 0, NULL, 0); } int media_recorder_get_property(void* handle, const char* target, const char* key, char* value, int value_len) { return media_proxy_once(handle, target, key, NULL, 0, value, value_len); } int media_recorder_take_picture(char* params, char* filename, size_t number) { int ret = 0; MediaIOPriv* priv; if (!number || number > INT_MAX) return -EINVAL; priv = calloc(1, sizeof(MediaIOPriv)); if (!priv) return -ENOMEM; sem_init(&priv->sem, 0, 0); priv->cookie = media_recorder_start_picture(params, filename, number, media_recorder_take_picture_cb, priv); if (!priv->cookie) { free(priv); return -EINVAL; } sem_wait(&priv->sem); sem_destroy(&priv->sem); ret = priv->result; free(priv); return ret; } void* media_recorder_start_picture(char* params, char* filename, size_t number, media_event_callback event_cb, void* cookie) { char option[32]; void* handle = NULL; int ret; if (!number || number > INT_MAX) return NULL; handle = media_recorder_open(params); if (!handle) return NULL; ret = media_recorder_set_event_callback(handle, cookie, event_cb); if (ret < 0) goto error; snprintf(option, sizeof(option), "total_number=%zu", number); ret = media_recorder_prepare(handle, filename, option); if (ret < 0) goto error; ret = media_recorder_start(handle); if (ret < 0) goto error; return handle; error: media_recorder_close(handle); return NULL; } int media_recorder_finish_picture(void* handle) { return media_recorder_close(handle); }
07-11
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值