带有YoutubePlayer插件的NativeScript-Vue在Android中不起作用

时间:2019-01-10 17:05:20

标签: nativescript nativescript-plugin nativescript-vue

我正在尝试在NativeScript-Vue中使用Youtubeplayer plugin。该插件具有用于Typescript和Angular的演示,但没有Vue,因此以前可能从未使用Vue进行过测试。

在main.js中,我有:

int bytes_read, bytes_written;
unsigned char indata[AES_BLOCK_SIZE];
unsigned char outdata[AES_BLOCK_SIZE];
unsigned char ckey[] = "thiskeyisverybad";
unsigned char ivec[] = "dontusethisinput";

AES_KEY key;

AES_set_encrypt_key(ckey, 128, &key);

int num = 0;
FILE * ifp = fopen("Test.XML","rb");
FILE * ofp = fopen("Enc.XML", "wb");
while (1) {
    bytes_read = fread(indata, 1, AES_BLOCK_SIZE, ifp);

    AES_cfb128_encrypt(indata, outdata, bytes_read, &key, ivec,&num,AES_ENCRYPT);

    bytes_written = fwrite(outdata, 1, bytes_read, ofp);
    if (bytes_read < AES_BLOCK_SIZE)
        break;
}

num = 0;
FILE * ifpe = fopen("Enc.XML", "wb");
FILE * ofpe = fopen("TestDec.XML", "rb");

while (1) {
    bytes_read = fread(indata, 1, AES_BLOCK_SIZE, ifpe);
    AES_cfb128_encrypt(indata, outdata, bytes_read, &key, ivec, &num, AES_DECRYPT);

    bytes_written = fwrite(outdata, 1, bytes_read, ofpe);
    if (bytes_read < AES_BLOCK_SIZE)
        break;
}

在App.vue中,我有:

Vue.registerElement('YoutubePlayer', () => require('nativescript-youtubeplayer').YoutubePlayer);

这将为IOS构建并运行正常,但对于Android,则不会构建。相反,我得到了错误:

<template>
    <Page>
        <ActionBar title="Welcome to NativeScript-Vue!"/>
        <GridLayout columns="*" rows="*">
            <YoutubePlayer height="50%" width="90%" id="player" options="" apiKey="...my api key..." src="...my video source..." backgroundColor="gray"></YoutubePlayer>
        </GridLayout>
    </Page>
</template>

我发布了一个issue on GitHub,并在NativeScript #plugins论坛中询问。开发人员说,他没有空闲时间来使用此插件,据我了解,但这只能由其他人来解决该插件的未解决问题。我想帮助您解决该问题,但是我不知道从哪里开始。

0 个答案:

没有答案