Capture Camera

Hi I’m relatively new to Yii so apologies in advance.

I have an issue with the code below, basically I’m trying to get my add button to prompt “Take Photo” in iOS but I doesn’t!

Any help would be appreciated.


<?php echo CHtml::openTag('div', $this->htmlOptions); ?>

    <!-- Gallery Toolbar -->

    <div class="btn-toolbar gform">

        <span class="btn btn-success fileinput-button">

            <i class="icon-plus icon-white"></i>

            <?php echo Yii::t('galleryManager.main', 'Add…');?>

            <input type="file" name="image" class="afile" accept="image/*;capture" multiple="multiple" id="cameraInput"/>

        </span>

...

Well, I think you need this:


<input type="file" accept="image/*;capture=camera">

I also read that this only works with IOS 6 and newer. So I guess you gotta use ‘getUserMedia’.

http://www.html5rocks.com/en/tutorials/getusermedia/intro/

Thanks waitforit,

but sussed that out you can see that in the code I posted, its the class JS that screws the capture if I remove the JS class the button behaves but obs the JS doesn’t run so back to the extension developer I think.