Skip to content

Conflict with Ti.YoutubePlayer #418

Description

@alexlarocca

I created an issue on Ti.YoutubePlayer.

The app build fails when the project includes this module and Hyperloop.

[LiveView] TypeError: Cannot read properties of undefined (reading 'fileRef_comment')
    at /Users/alessandro/Library/Application Support/Titanium/modules/iphone/hyperloop/7.1.0/hooks/hyperloop.js:1078:63
    at Array.forEach (<anonymous>)
    at /Users/alessandro/Library/Application Support/Titanium/modules/iphone/hyperloop/7.1.0/hooks/hyperloop.js:1077:54
    at Array.forEach (<anonymous>)
    at HyperloopiOSBuilder.updateXcodeProject (/Users/alessandro/Library/Application Support/Titanium/modules/iphone/hyperloop/7.1.0/hooks/hyperloop.js:1075:45)
    at /Users/alessandro/Library/Application Support/Titanium/mobilesdk/osx/13.1.1.GA/node_modules/node-appc/lib/async.js:78:5
    at /Users/alessandro/Library/Application Support/Titanium/mobilesdk/osx/13.1.1.GA/node_modules/async/dist/async.js:3675:28
    at replenish (/Users/alessandro/Library/Application Support/Titanium/mobilesdk/osx/13.1.1.GA/node_modules/async/dist/async.js:447:21)
    at iterateeCallback (/Users/alessandro/Library/Application Support/Titanium/mobilesdk/osx/13.1.1.GA/node_modules/async/dist/async.js:431:21)
    at /Users/alessandro/Library/Application Support/Titanium/mobilesdk/osx/13.1.1.GA/node_modules/async/dist/async.js:328:20

To replicate this issue, add both modules to the project:

<module>hyperloop</module>
<module>ti.youtubeplayer</module>

Also include some code using Hyperloop otherwise the build process will skip it.

const win = Ti.UI.createWindow();

// this forces to include hyperloop
var NSLocale = require('Foundation/NSLocale');
var	preferredLanguage = NSLocale.preferredLanguages.objectAtIndex(0).toString();

const YouTubePlayer = require('ti.youtubeplayer');

const player = YouTubePlayer.createPlayerView({
    videoId: 'dQw4w9WgXcQ',
    scalingMode: 'SCALING_ASPECT_FIT',
    autoplay: true,
    loop: true,
    showControls: false,
    muted: false,
    preferredQuality: YouTubePlayer.PLAYBACK_QUALITY_HIGH_RESOLUTION,
    width: Ti.UI.FILL,
    height: Ti.UI.FILL,
    backgroundColor: '#000'
});

win.add(player);
win.open(); 

Ti SDK 13.1.1.GA
Hyperloop 7.1.0
Node 22.19.0
Ti CLI 8.1.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions